data=read.csv("http://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data",header=FALSE)
summary(data)
library(nnet)
net=nnet(V7~., data=data,size=7,maxit=50)
result=predict(net,type="class")
tab=table(data[["V7"]], result)
print(tab)
cat("accurary: ",100*sum(diag(tab))/sum(tab),"%\n",sep="")