Closed Pablo-Davila closed 2 years ago
Hi @Pablo-Davila, thank you for your interest in LightGBM. For the linear tree learner the first iteration only sets constant leaf values: https://github.com/microsoft/LightGBM/blob/6d825cd3a1ac6f886654f604e824f7823a259cb5/src/treelearner/linear_tree_learner.cpp#L177-L182
Adjusting your example to have 'n_estimators': 2
gives the expected output.
Please let us know if this helps.
Hi @jmoralez, thank you very much for your quick and accurate response. This definitely solves my issue.
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.
Description
I am trying to build a gradient boosting tree with linear models in its leafs. I am using the parameter linear_tree for this purpose.
To check wether the leafs are actually linear I have built a sample dataset and a regression model with a single estimator with the code below. The results after running the script suggest that the leafs are constant values:
Am I missing something?
Reproducible example
Environment info
LightGBM version or commit hash: v3.3.2