Skip to content

Instantly share code, notes, and snippets.

@kperry2215
Created July 30, 2019 22:38
Show Gist options
  • Save kperry2215/a38d7c3db751525a6143ea42c246ce21 to your computer and use it in GitHub Desktop.
Save kperry2215/a38d7c3db751525a6143ea42c246ce21 to your computer and use it in GitHub Desktop.
#Obtain feature importances in the model
feature_importances = pd.DataFrame(rf.feature_importances_,
index = feature_list,
columns=['importance']).sort_values('importance',
ascending=False)
print(feature_importances)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment