Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created January 28, 2020 10:34
Show Gist options
  • Save lakshay-arora/e6dcf58cb27296067e1a46f50cfda984 to your computer and use it in GitHub Desktop.
Save lakshay-arora/e6dcf58cb27296067e1a46f50cfda984 to your computer and use it in GitHub Desktop.
# plot the 7 most important features
plt.figure(figsize=(10,7))
feat_importances = pd.Series(model_RFR.feature_importances_, index = train_x.columns)
feat_importances.nlargest(7).plot(kind='barh');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment