Skip to content
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

Feature Request: Add Support for Linear Trees in LightGBM #2817

Open
dragonbra opened this issue Jun 12, 2024 · 3 comments
Open

Feature Request: Add Support for Linear Trees in LightGBM #2817

dragonbra opened this issue Jun 12, 2024 · 3 comments

Comments

@dragonbra
Copy link

dragonbra commented Jun 12, 2024

I noticed that the leaf nodes in decision trees only contain a single response value, as seen in this example: https://github.com/oneapi-src/oneDAL/blob/bbe13a4bcaca8eabd3751b0ccf58ed9a044254f9/cpp/daal/include/algorithms/tree_utils/tree_utils_regression.h#L51

https://github.com/oneapi-src/oneDAL/blob/bbe13a4bcaca8eabd3751b0ccf58ed9a044254f9/examples/daal/cpp/source/gradient_boosted_trees/gbt_reg_traversed_model_builder.cpp#L92

In recent versions of the LightGBM model, a new feature called linear trees has been introduced: link to the feature.
However, if I convert a linear tree model to the DAAL format, it can only store the leaf constant value, not the linear model within the leaf node.

Could this feature be added? I would greatly appreciate it.

@AllenSun1024
Copy link

Hi, @dragonbra

According to your request, is it possible to use C++ interfaces to 1) convert trained LGBM models to oneDAL and 2) predict with converted oneDAL models?

Thank you~

@dragonbra
Copy link
Author

Hi, @dragonbra

According to your request, is it possible to use C++ interfaces to 1) convert trained LGBM models to oneDAL and 2) predict with converted oneDAL models?

Thank you~

Hi @AllenSun1024

I have only tried converting LightGBM models to the Python version of oneDAL for inference. Since it does not support linear models, I did not explore further. Therefore, I am not sure how to use the C++ interface with oneDAL models converted from LGBM.

Subsequently, I implemented my own CUDA-accelerated inference process for LightGBM with linear_tree=true.

I hope this information helps you.

@AllenSun1024
Copy link

Hi, @dragonbra

I've confirmed that No C++ converter interfaces exist.

Best,
Chao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants