siboehm / lleaves

Compiler for LightGBM gradient-boosted trees, based on LLVM. Speeds up prediction by ≥10x.
https://lleaves.readthedocs.io/en/latest/
MIT License
333 stars 28 forks source link

Does lleaves support linear_trees? #78

Open dragonbra opened 1 month ago

dragonbra commented 1 month ago

I compared the prediction results with lleaves and lightGBM and noticed that when I set num_tree to 1, the predictions are equal. But they are different when I set any numbers greater than 1.

I realized that if I set linear_tree=True, only the first tree will use leaf_const as its prediction value, or the tree will use linear model's value.

Does this observation mean that lleaves do not support linear_trees?