data=read.csv("crabdata.csv",header=FALSE)
summary(data)
library(nnet)
net=nnet(V7 ~ ., data=data, size=5)
result=predict(net, type="class")
t=table(data[["V7"]],result)
print(t)
cat("accuracy: ",100 * sum(diag(t)) / sum(t), "%\n", sep="")