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
Hi,
I observed a compatibility issue of your package function colino::step_select_boruta when using it on caret::train...
What to do?
Thanks a lot!!!!
library(caret)
library(colino)
library(doParallel)
set.seed(42)
## A dummy dataset
dataset <- mtcars
dataset$am <- as.factor(dataset$am)
levels(dataset$am) <- c("zero","one")
## Despite the colino::step_select_boruta working for a dataset
rec_boruta <-
recipe(am ~ ., data = dataset) %>%
colino::step_select_boruta(all_predictors(), outcome = "am")
prepped <- prep(rec_boruta)
prepped
cl <- makePSOCKcluster(detectCores())
registerDoParallel(cl)
## It is not working for caret::train
fit_model <- train(rec_boruta,
data = dataset,
method = "glm")
# Error in { : task 1 failed - "$ operator is invalid for atomic vectors"
## But caret::train is working for other step like recipes::step_corr
rec_corr <-
recipe(am ~ ., data = dataset) %>%
step_corr(all_predictors())
fit_model <- train(rec_corr,
data = dataset,
method = "glm")
The text was updated successfully, but these errors were encountered:
cadam00
changed the title
colino & caret compatibiliyu
colino & caret compatibility
Mar 24, 2024
Hi,
I observed a compatibility issue of your package function colino::step_select_boruta when using it on caret::train...
What to do?
Thanks a lot!!!!
The text was updated successfully, but these errors were encountered: