machine-learningscikit-learnfeature-selectiongradient-descent

Unable to find out the feature importance list from histgradientboosting classifier


Is there any way to find the feature importances from a histgradientboosting classifier model in python?

I tried using model.feature_importances_ but the error message was

AttributeError: 'HistGradientBoostingClassifier' object has no attribute 'feature_importances_'

I wanted to get all the features in a list with percentage of importance of each feature.


Solution

  • The only thing you could try is: https://scikit-learn.org/stable/modules/generated/sklearn.inspection.permutation_importance.html