You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the package I noticed that the function safs throws an unexpected warning message about an error occurring when the default value of differences = TRUE is used.
I created a safs object using the example code from the safs help file to demonstrate this, as can be seen by the reproducible code found below.
caret version = 6.0-86
R version = 4.0.4
Thanks,
Giulia
library(caret)
#> Loading required package: lattice#> Loading required package: ggplot2
set.seed(1)
train_data<-caret::twoClassSim(100, noiseVars=10)
test_data<-caret::twoClassSim(10, noiseVars=10)
## A short examplectrl<-caret::safsControl(functions=rfSA,
method="cv",
number=3)
rf_search<-caret::safs(x=train_data[, -ncol(train_data)],
y=train_data$Class,
iters=3,
safsControl=ctrl)
#> Warning in safs.default(x = train_data[, -ncol(train_data)], y =#> train_data$Class, : An error occured when computing the variable differences
The text was updated successfully, but these errors were encountered:
Thanks. I've added some additional code that gives a slightly better warning message.
The main issue was a low number of iterations. It didn't have enough permutations of the predictors to compute the differences. Doing 5+ iterations gives results and no warning.
Hello,
Thanks for your package.
While using the package I noticed that the function
safs
throws an unexpected warning message about an error occurring when the default value ofdifferences = TRUE
is used.I created a
safs
object using the example code from thesafs
help file to demonstrate this, as can be seen by the reproducible code found below.caret version = 6.0-86
R version = 4.0.4
Thanks,
Giulia
The text was updated successfully, but these errors were encountered: