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

Engine 'catboost' is not supported for boost_tree(). See show_engines('boost_tree'). #69

Open
zhaoliang0302 opened this issue Nov 6, 2022 · 1 comment

Comments

@zhaoliang0302
Copy link

Hi, error occurs after tuning grid with catboost in treesnip package:

remotes::install_github("curso-r/treesnip@catboost")
library(treesnip)

catboost_model <-
  boost_tree( mode = "classification",
              mtry = tune(), # default [1, ?]
              trees = 1000, # default [1, 2000]
              min_n = 20, # default [2, 40]
              tree_depth = 6, # default [1, 15]
              learn_rate = 0.05, # default [-10, -1]
              engine = "catboost"
  )

catboost_wf <-
  workflow() %>%
  add_model(catboost_model) %>% 
  add_recipe(model_recipe)

catboost_results <-
  catboost_wf %>% 
  tune_grid(resamples = miR_cv,
            grid = 5,
            control = control_grid(save_pred = TRUE),
            metrics = metric_set(accuracy,roc_auc)
  )
#Warning message:
#All models failed. Run `show_notes(.Last.tune.result)` for more information.

show_notes(.Last.tune.result)

#unique notes:
#------------------------------------------------------------------------------------------
#Error in `check_spec_mode_engine_val()`:
#! Engine 'catboost' is not supported for `boost_tree()`. See `show_engines('boost_tree')`.
@vidarsumo
Copy link

Run this first:

parsnip::set_dependency("boost_tree", eng = "catboost", pkg = "catboost", mode = "regression")
parsnip::set_dependency("boost_tree", eng = "catboost", pkg = "treesnip", mode = "regression")

Should work.

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