-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Lightgbm cv feature importance python #1445
Comments
you can do this by yourself simply, just get Booster from cv folds, and then calculate mean/std of feature importance. |
Hi, thanks for the quick response. The LightGBM native CV function I believe just returns a dictionary of results rather than the individual booster parameters. Or am I missing something. |
@StrikerRUS can we return the |
@guolinke Did you mean It'll be breaking changes. Maybe push |
@guolinke @StrikerRUS It would be nice to have an "ensemble of models" object. The benefits of having such a class is to return importances and predictions as an average. Currently, especially on Kaggle, people always do the cross-validation and ensembling at the same time. cv function can either return all generated models or out of sample predictions and average ensembled predictons for the test set if given. If you think that this feature is nice to have, I would like to help. |
@StrikerRUS could we not do something like,
with default as |
@JoshuaC3 I suppose it's possible. Would you mind to create a PR? |
@StrikerRUS - Yes. It might take me some time to familiarise myself with this but I am very keen to get this in. All - I gave this a little thought and I think it should return the mean and std of the feature importance. I think it should be called I also only intend to return the stats final feature importance's (contrary to the behaviour of |
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
…283,#2105,#1445) (#3204) * [python] add return_cvbooster flag to cv function and rename _CVBooster to make public (#283,#2105) * [python] Reduce expected metric of unit testing * [docs] add the CVBooster to the documentation * [python] reflect the review comments - Add some clarifications to the documentation - Rename CVBooster.append to make private - Decrease iteration rounds of testing to save CI time - Use CVBooster as root member of lgb * [python] add more checks in testing for cv Co-authored-by: Nikita Titov <[email protected]> * [python] add docstring for instance attributes of CVBooster Co-authored-by: Nikita Titov <[email protected]> * [python] fix docstring Co-authored-by: Nikita Titov <[email protected]> Co-authored-by: Nikita Titov <[email protected]>
Implemented in #3204. |
It would be useful for the cv function to retain mean/std of feature importances across the cv folds. I don’t believe this is currently implemented.
The text was updated successfully, but these errors were encountered: