An importance score ranks an input feature by its contribution to a model’s decisions. It supports feature selection and global interpretability: low-scoring features may be removable with little loss in model quality, while reducing training and prediction cost. Scores are commonly normalized to sum to 1, so they act as relative feature weights rather than standalone measures of causal effect. section 2.3.3 section 9.6
For a decision tree, importance is based on how much a feature improves splits across the tree. Each split’s entropy decrease is weighted by the examples reaching that node, then contributions are accumulated by feature and normalized. A feature never used in a split receives zero importance. section 9.1.2
Tree ensembles extend this idea by aggregating their trees’ scores:
- A random forest reports feature importances through feature_importances_, allowing features to be ranked and filtered with an inspected or validation-selected threshold. section 2.5.3
- An ensemble importance can be computed by averaging importances from its base decision trees; scikit-learn random forests and XGBoost provide these aggregate scores. section 9.2.3
- Interpret rankings carefully when features are strongly correlated: interchangeable inputs can carry similar information, while their order of use can affect tree-based scores. section 2.3.3
Permutation feature importance offers a model-agnostic alternative. Start with performance on a hold-out test set, shuffle one feature’s values, and measure the resulting increase in test error. A large degradation indicates that the model depended on that feature; little change indicates limited contribution. Repeat for every feature and use repeated permutations for a more robust estimate. section 9.3.1
Figure 9.7 The procedure for computing permutation feature importance illustrated for the third feature. This procedure is repeated for all features. Permutation feature importance uses only inputs and outputs to estimate feature importance and doesn’t use model internals (making this a model-agnostic approach).
The procedure visualizes the before-and-after test evaluation for one shuffled feature, then repeats it across all features without inspecting model internals. section 9.3.1
Breast cancer feature selection
A random forest can rank diagnostic measurements for benign-versus-malignant classification. With an importance threshold of 0.02, the selected features include mean concave points, worst area, and worst concave points. Comparing this ranking with label correlations can be informative, but correlation alone may miss nonlinear feature-label relationships. section 2.5.3
Importance methods answer different questions. Split-based scores expose how tree models used features internally; permutation scores test how disrupting each feature changes predictive performance. Both are global explanations, describing overall model behavior rather than explaining one individual prediction. section 9.2.3 section 9.3.1





