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

Categorical Features in Booster object #5321

Closed
MayankKr8 opened this issue Jun 22, 2022 · 3 comments
Closed

Categorical Features in Booster object #5321

MayankKr8 opened this issue Jun 22, 2022 · 3 comments
Labels

Comments

@MayankKr8
Copy link

Summary

Unable to find the datatypes of features used in lightgbm booster object in python.

Motivation

This would help set the datatypes more easily for validation and prediction datasets

Description

I have been working with lightgbm Booster objects by loading already saved models from filespace. I want the process of setting the data types of the validation dataset to be more automated. At the current stage, I can't find any attribute or method that helps fetch the categorical features of the booster, but only the names of all features used. Since if there's a mismatch in categorical features used the model would fail in predicting and raises the specific exception of mismatch, I am hoping this information is already present in the booster object, it would be only logical to expose this information.

References

@jmoralez
Copy link
Collaborator

Hi @MayankKr8, thank you for your interest in LightGBM. This is a known issue and is documented in #2613 and there's an ongoing effort to read the parameters from the saved booster in #4802, you can subscribe to that PR if you're interested in following the progress.

@github-actions
Copy link

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. Thank you for taking the time to improve LightGBM!

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants