Search⌘ K
AI Features

Feature Importance

Explore how to calculate feature importance in decision tree learning, including single trees, bagged trees, and random forests. Understand the role of Gini importance and mean decrease in impurity, and learn how to visualize and compare feature importance across different models.

Decision tree and random forest modules allow us to retrieve the importance of individual features after training by using the feature_importances_ attribute of a trained model instance. The higher the value is, the more important the respective feature will be. We must grab the feature importance from the individual trees and compute the mean for bagged decision trees.

Feature

...