I am trying to plot feature importances for a random forest model and map each feature importance back to the original coefficient. I\'ve managed to create a plot that shows the
Another simple way to get a sorted list
importances = list(zip(xgb_classifier.feature_importances_, df.columns)) importances.sort(reverse=True)
Next code adds a visualization if it's necessary
pd.DataFrame(importances, index=[x for (_,x) in importances]).plot(kind = 'bar')