Displaying 1 result from an estimated 1 matches for "train_x".
Did you mean:
train_y
2009 Jan 15
2
problems with extractPrediction in package caret
...t. 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 numeric attributes and o...