[R] error in random forest

From: Nagu <thogiti_at_gmail.com>
Date: Fri, 07 Mar 2008 11:36:36 -0800


I get the following error when I try to predict the probabilities of a test sample:

Error in predict.randomForest(fit.EBA.OM.rf.50, x.OM, type = "prob") :   New factor levels not present in the training data

I have about 630 predictor variables in the dataset x.OM (25 factor variables and the remaining are continuous variables). Any ideas on how to trace it?

Thank you,

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 07 Mar 2008 - 19:39:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Mar 2008 - 10:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive