[R] nnet inappropriate fit for class error
Duygu Gunaydin
duygug at stanford.edu
Wed Jun 1 02:23:33 CEST 2011
Hi,
I am trying to run a nnet algorithm but when I try to use the predict function with type='class', it gives the following error:
fit <- nnet(y~., size = 1, data = train.set, rang = 0.5, maxit=200, decay = 0)
predict<-predict(fit,test.set,type='class')
Error in predict.nnet(fit, test.set, type = "class") :
inappropriate fit for class
I couldn't figure out the reason for this, are there any specifications to use type='class' that I am missing?
Thank you,
Duygu Gunaydin
More information about the R-help
mailing list