Dear All,
After followed the help of nnet, I could get the networks trained and,
excitedly, get the prediction for other samples. It is a two classes data set,
I used "N" and "P" to label the two. My question is, how do I get the predicted
numerical value for each sample? Not just give me the label(either "N" or "P")?
Thanks!
FYI: The nnet example I followed from help document is,
ird <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
species = c(rep("s",50), rep("c", 50), rep("v", 50)))
ir.nn2 <- nnet(species ~ ., data = ird, subset = samp, size = 2, rang =
0.1,
decay = 5e-4, maxit = 200)
table(ird$species[-samp], predict(ir.nn2, ird[-samp,], type = "class"))
Best regards,
Baoqiang Cao
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html