Reputation: 11
When I want to use the lightgbm engine for the boost_tree function in the parsnip package, I get an error like this:
lgbm_model <-
boost_tree( mode = "classification",
mtry = tune(),
trees = tune(),
min_n = tune(),
tree_depth = tune(),
learn_rate = tune(),
loss_reduction = tune(),
engine = "lightgbm"
)
error:
Error in
check_spec_mode_engine_val()
: ! Engine 'lightgbm' is not supported forboost_tree()
. Seeshow_engines('boost_tree')
. Runrlang::last_error()
to see where the error occurred.
What could this problem be related to?
Upvotes: 0
Views: 686
Reputation: 27
The show_engines('boost_tree')
shows the available engines for the model boost_tree()
:
engine mode
1 xgboost classification 2 xgboost regression
3 C5.0 classification 4 spark classification 5 spark regression
As we can see, there is no lightgbm
engine here, therefore it cannot be used as an engine input.
The solution is adding the new engine to the parsnip
. You can read about how to do so here
Upvotes: -1