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

Including column names when saving LightGBM native model? #332

Closed
ywskycn opened this issue Jun 28, 2018 · 3 comments
Closed

Including column names when saving LightGBM native model? #332

ywskycn opened this issue Jun 28, 2018 · 3 comments
Assignees

Comments

@ywskycn
Copy link
Contributor

ywskycn commented Jun 28, 2018

When using LightGBMBooster.saveNativeModel() function, it looks like the model doesn't include original column names, but using "Column_*" instead. Do I miss any config here? @little-eyes @imatiach-msft

@ywskycn
Copy link
Contributor Author

ywskycn commented Jun 28, 2018

I think this is because I use spark pipeline model, where assembles all feature columns into one vector, and the lightgbm library doesn't have the original feature column names.. Not sure any good solution to add column names back, or need to implement sth like https://github.com/jpmml/jpmml-sparkml-xgboost?

@imatiach-msft
Copy link
Contributor

@ywskycn yes, this is definitely something that needs to be fixed and @little-eyes already saw this issue before. I need to figure out a way to pass the column names to vector assembler and then from vector assembler pass them to native lightgbm code. It's something that would need to be investigated.

@imatiach-msft
Copy link
Contributor

closing as PR to include column names (when they are available on slot metadata in features column) has been merged, see PR #526
The fix should be available in next release.

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

No branches or pull requests

3 participants