Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn random forest feature importance

import pandas as pd
forest_importances = pd.Series(importances, index=feature_names)

fig, ax = plt.subplots()
forest_importances.plot.bar(yerr=std, ax=ax)
ax.set_title("Feature importances using MDI")
ax.set_ylabel("Mean decrease in impurity")
fig.tight_layout()
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #sklearn #random #forest #feature #importance
ADD COMMENT
Topic
Name
9+8 =