How could we get
feature_importances when we are performing regression with
There is something like
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.Sign up to join this community
from xgboost import XGBClassifier model = XGBClassifier.fit(X,y) # importance_type = ['weight', 'gain', 'cover', 'total_gain', 'total_cover'] model.get_booster().get_score(importance_type='weight')
However, the method below also returns feature importance's and that have different values to any of the "importance_type" options in the method above. This was raised in this github issue, but there is no answer [as of Jan 2019].