Displaying 1 result from an estimated 1 matches for "rftrain".
Did you mean:
retrain
2009 Jan 15
2
problems with extractPrediction in package caret
...tions on a test dataset. I tried to follow the instructions in the manual and the vignettes but unfortunately I´m getting an error message I can`t figure out.
Here is my code:
rfControl <- trainControl(method = "oob", returnResamp = "all", returnData=TRUE, verboseIter = TRUE)
rftrain <- train(x=train_x, y=trainclass, method="rf", tuneGrid=tuneGrid, tr.control=rfControl)
pred <- predict(rftrain)
pred # this works fine
expred <- extractPrediction(rftrain)
Error in models[[1]]$trainingData :
$ operator is invalid for atomic vectors
My predictors are 28 nu...