When I run this code (R 2.13.2, caret 4.98 on windows 7):
library(caret)
data(iris)
TrainData <- iris[,1:4]
TrainClasses <- iris[,5]
rfFit <- train(TrainData, TrainClasses,
method = "rf",
tuneLength = 3,
trControl = trainControl(method = "oob"))
I get the following error:
Fitting: mtry=2
Fitting: mtry=3
Fitting: mtry=4
Aggregating results
Selecting tuning parameters
Fitting model on full training set
Error in structure(list(method = method, modelType = modelType, results = performance, :
object 'resampledCM' not found
What am I doing wrong?
/edit: I updated to caret 4.99 using R forge, and the problem goes away. It seems to have been unique to caret 4.98 and R 2.13.2.
caret
are you using? (It works for me withcaret
v. 5.01-001, R v. 2.13.2.) $\endgroup$ – chl Oct 7 '11 at 17:50