Python Forum

Full Version: Plotting Feature Importance from ExtraTreesClassifier
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following python code gives all the features importance.

model = ExtraTreesClassifier()
model.fit(X, y)
print(model.feature_importances_)
52
Now all that code does is give the features from sensor_00 to sensor_51 (52 sensors total) with their feature importance as shown in the attached graphic.

Now I would like to plot this in a graphic with all 52 feature names, plotted against their importance. The graphics starts with sensor_00 feature importance and goes all the way to sensor_51 feature importance.

I will attach sample graphic.