LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

How to get every leaf preidction of every tree in a gbm tree?

Open defaultRobot opened this issue 9 years ago • 2 comments

I want to use a gbm tree to get features for other models to use. I know I can get a gbm tree prediction, but I want to get every leaf prediction of every tree in a gbm tree in details. For example, tree A in a gbm tree, I want to know which leaf of A is chosen to predict and the other leaves location in A. please see the following picture: fb_gbdt1

defaultRobot avatar Jan 21 '17 05:01 defaultRobot

refer to https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.md#io-parameters.

Set "predict_leaf_index=true"

guolinke avatar Jan 21 '17 06:01 guolinke

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.

github-actions[bot] avatar Aug 24 '23 02:08 github-actions[bot]