-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
XGBRegressor Importance_type #4094
Comments
I am creating a model with XGBRegressor and I noticed that the attribute importance_type, which is set to "gain" by default always uses type "weight", no matter the specified value. To reproduce the issue, try creating two XGBRegressor models with the same parameters using different values for the importance_type attribute. Then, call the property feature_importances_ and the result obtained is the same. I have checked in the definition of this property and it seems to be using the get_fscore() method of the XGBModel.getbooster() tree model. This function always uses importance_type="weight", hard-coded. I am using XGBoost version 0.81 installed with conda. |
The fix was made in #3876, and it is not part of version 0.81. Can you compile from the source?
|
Ok. Thanks! |
Thanks for participating in the XGBoost community! We use https://discuss.xgboost.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :)
Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.
For bug reports, to help the developer act on the issues, please include a description of your environment, preferably a minimum script to reproduce the problem.
For feature proposals, list clear, small actionable items so we can track the progress of the change.
The text was updated successfully, but these errors were encountered: