Wild guess : You need to have some kind of score for ROC to work (so you can work with a threshold), so a predict() that only returns classlabels probably won't work.
On 13.07.2012, at 15:25, blerta wrote: > Hi, > > I don't really understand how ROCR works. Here's another example with a > randomforest model: I have the training dataset(bank_training) and testing > dataset(bank_testing) and I ran a randomForest as below: > > bankrf<-randomForest(y~., bank_training, mtry=4, ntree=2, > keep.forest=TRUE,importance=TRUE) > bankrf.pred<-predict(bankrf, bank_testing) > library(ROCR) > pred<-prediction(bankrf.pred$y, bank_testing$y) > > Here I get the error that the prediction format is incorrect? Where is the > mistake? > > Thanks in advance > > -- > View this message in context: > http://r.789695.n4.nabble.com/ROC-curves-with-ROCR-tp4636435.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [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 > and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ [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 and provide commented, minimal, self-contained, reproducible code.

