Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varImp error with bagFDA: could not find function "." #1349

Open
yctai105 opened this issue Sep 6, 2023 · 1 comment
Open

varImp error with bagFDA: could not find function "." #1349

yctai105 opened this issue Sep 6, 2023 · 1 comment

Comments

@yctai105
Copy link

yctai105 commented Sep 6, 2023

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:

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 "."


Session Info:

>sessionInfo()
caret_6.0-94

@tinaty
Copy link

tinaty commented Jan 30, 2024

Hi @yctai105 just to check have you resolved this issue? I have experienced the same error, and I also used the version of caret 6.0-94. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants