-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[LightGBM] [Warning] Unknown parameter: linear_tree #3910
Comments
Hi @flippercy ! Linear trees are not included in the latest release. Refer to #3299 (comment) for workaround. |
@flippercy by the way, linear trees are available in the R package. Just not released to CRAN yet. You can see
In the future, if you find yourself turning to |
Thank you both! I will try the methods you suggested while waiting for the next official release! |
Hi @jameslamb, just to confirm - does monotone_constraints work with linear_tree? (I believe so but want to double check). Thank you! |
I think @btrotta is better-qualified to answer that question than I am. |
@flippercy It is not possible to enforce monotone constraints when using linear tree. This is because the linear models are fitted on each leaf after the whole tree is constructed, and we do not take monotone constraints into account when fitting the linear models. However, you can still use monotone constraints when linear_tree is true, and the constraints will be taken into account when choosing the tree split points. As noted above, in general the resulting linear tree will not be monotone, but it will probably be "closer to" monotone than it would be otherwise. |
@btrotta thank you for the response! @jameslamb can someone add this to the documentation of lightGBM parameters at https://lightgbm.readthedocs.io/en/latest/Parameters.html, please? Thank you! |
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
I am using lightgbm via reticulate in R:
parameters = {
'objective': 'binary',
'linear_tree': 'true',
'tree_learner': 'serial',
'metric': 'auc',
'n_jobs': 12,
'seed': 19850606,
'boosting': 'gbdt',
'num_leaves': 31,
'learning_rate': 0.05,
'verbose': 1,
'monotone_constraints': lightGBM_monotoneVector,
'monotone_constraints_method':'advanced'
}
lightgbm_model = lgb.train(parameters,
train_data,
valid_sets=test_data,
num_boost_round=500,
early_stopping_rounds=50)
However, I got a warning:
[LightGBM] [Warning] Unknown parameter: linear_tree
What is the reason? I know that linear_tree is not available in the R library of lightGBM but here I am using the python package via reticulate.
Thank you.
The text was updated successfully, but these errors were encountered: