Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def feature_plot(imp):
- fimp = pd.DataFrame({'Feature': X.columns, 'Importance' : np.round(imp,5)})
- fimp =fimp.sort_values(by='Importance', ascending=False)
- plt.figure(figsize=(30,15))
- plt.plot(fimp['Feature'], fimp['Importance'])
- plt.xticks(rotation=90);
- feature_plot(rf.feature_importances_*100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement