Skip to content

modifying predict.nnet() to function with errorest()

2 messages · Armitage, Dave, Max Kuhn

#
Greetings,

I am having trouble calculating artificial neural network 
misclassification errors using errorest() from the ipred package. 
I have had no problems estimating the values with randomForest() 
or svm(), but can't seem to get it to work with nnet(). I believe 
this is due to the output of the predict.nnet() function within 
cv.factor(). Below is a quick example of the problem I'm 
experiencing. Any ideas on how to get around it or will it simply 
not work with nnet()?
+         species = factor(c(rep("s",50), rep("c", 50), rep("v", 
50))))
# weights:  19
initial  value 73.864441
.
.
.
final  value 0.339114
converged
Error in cv.factor(y, formula, data, model = model, predict = 
predict,  :
  predict does not return factor values



Thanks,
Dave
______________________________________

Dave Armitage
Wildlife Ecology and Conservation
University of Florida
#
Dave,

You should look at the train() function in teh caret package.

Max
On Mon, Nov 2, 2009 at 6:01 PM, Armitage, Dave <dave.armitage at ufl.edu> wrote: