Python Forum
Plotting Feature Importance from ExtraTreesClassifier
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plotting Feature Importance from ExtraTreesClassifier
#1
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.

Attached Files

Thumbnail(s)
       
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  extratreesclassifier returns all zeroes instead of feature importances Led_Zeppelin 0 878 Jul-20-2022, 08:15 PM
Last Post: Led_Zeppelin

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020