I got an error when I ran varImp() on the train() output object using bagged models, e.g. bagFDA, bagEarth. Please see below. Thanks!
Minimal dataset:
library(caret)
set.seed(1)
X <- iris[1:100,1:4]
y <- iris[1:100,5]
y=factor(y, levels=c("setosa", "versicolor"))
Minimal, runnable code:
model_class <- train(
X, y,
metric='ROC',
method="bagFDA",
trControl=trainControl(
method="cv",
number=5,
classProbs=TRUE,
summaryFunction=twoClassSummary,
savePredictions="final")
)
> varImp(model_class)
Error in .(var) : could not find function "."
Hi,
I got an error when I ran varImp() on the train() output object using bagged models, e.g. bagFDA, bagEarth. Please see below. Thanks!
Minimal dataset:
Minimal, runnable code:
Session Info: