# Feature importance

> Canonical: https://skillalmanac.com/glossary/feature-importance | Verification status: pending | Index status: not offered to search engines

Feature importance is a family of techniques that score how much each input feature (a column of data) contributes to a model's predictions or performance. A score describes one fitted model, not the feature in isolation.

Also called: feature importances, permutation importance, variable importance, feature importance machine learning.

## In plain language

Feature importance answers the question, which of the inputs did this model lean on most? Imagine a model that predicts house prices from size, age and postcode. An importance score tells you roughly how much the model relies on each of those three. The catch is that the answer belongs to that one trained model. A weak model can give misleading scores, and when two inputs carry similar information the model can split the credit between them so that both look less important than they are. A score also does not prove that changing the input would change the real-world outcome.

## Technical definition

One widely used method is permutation feature importance. It shuffles the values of one feature in a dataset, which breaks that feature's relationship with the target, and measures how much the model's score drops. Repeating the shuffle gives a measure of variance. The scikit-learn user guide describes the method as model-agnostic and computable on held-out data, and contrasts it with impurity-based importances for tree models, which it says are biased towards high-cardinality features. Results depend on the scoring metric, and correlated features can lower each other's scores.

## How it shows up when you use agents

Feature importance appears when an agent trains or inspects a tabular model and reports a ranked list of columns. A coding agent working in a notebook can produce one in a few lines, for example with scikit-learn's permutation importance, and a ranked bar chart looks authoritative. It is an easy output to over-read.

What breaks when it is misunderstood: people treat the ranking as a fact about the data. The scikit-learn guide says importance reflects a particular fitted model, so features that look unimportant for a poor model could matter for a good one. Next actions: ask which model and which data the score was computed on (held-out data is the safer habit), ask which metric was used, and check whether correlated columns are sharing credit. If one column dominates, ask whether it leaks the answer. See [explainable AI](/glossary/explainable-ai) and [interpretability](/glossary/interpretability) for the wider question of explaining models, and [feature engineering](/glossary/feature-engineering) for how columns are made.

## Common confusions

- **Importance versus causation.** A high score says the model used a feature. It does not say that changing the feature would change the outcome in the world.
- **Permutation versus impurity-based importance.** The scikit-learn guide describes impurity-based importances for trees as biased towards high-cardinality features, while permutation importance can be computed on unseen data.
- **Low score versus useless feature.** With correlated features, shuffling one leaves the other available to the model, which can lower both scores.
- **One model versus all models.** The Fisher, Rudin and Dominici abstract says important variables for one well-performing model may be unimportant for another, so one model's scores can mislead.

## Worked examples in this catalogue

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill gives a fixed exploratory-analysis procedure and a CSV profiler that keeps findings descriptive, evidenced and caveated.

Why it exercises the concept: Looking at columns, missing values and relationships before modelling is descriptive groundwork that importance scores can be read against. The skill does not compute model-based importance.

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill checks train, validation and test files for duplicates, shared groups, time and label leakage and prints JSON.

Why it exercises the concept: A leaking feature can show up as the most important one, so leakage is worth ruling out when one column dominates. This is an illustrative reading, not an executed test.

### [huggingface-datasets](https://skillalmanac.com/skills/huggingface/huggingface-datasets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill reads Hugging Face datasets through the Dataset Viewer API: metadata, rows, search and filters.

Why it exercises the concept: It lets you inspect which columns a hosted tabular dataset contains before asking which of them matter. The catalogue has no model-training skill, so this is contrast, not a demonstration.

### [AI Hallucination: What to Check in Agent Output](https://skillalmanac.com/learn/ai-hallucination-what-to-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide with a checklist for reviewing agent output: claims, quotes, sources and figures before you rely on them.

Why it exercises the concept: Adjacent: it models the habit of checking a claim instead of trusting a confident output, which applies equally to an importance ranking an agent hands you.

## Related terms

- [Explainable AI (XAI)](https://skillalmanac.com/glossary/explainable-ai.md)
- [Interpretability](https://skillalmanac.com/glossary/interpretability.md)
- [Feature engineering](https://skillalmanac.com/glossary/feature-engineering.md)
- [Random forest](https://skillalmanac.com/glossary/random-forest.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)

## Sources

- [Permutation feature importance (scikit-learn user guide)](https://scikit-learn.org/stable/modules/permutation_importance.html), scikit-learn (accessed 2026-11-24)
- [Permutation Feature Importance (Interpretable Machine Learning)](https://christophm.github.io/interpretable-ml-book/feature-importance.html), Christoph Molnar (accessed 2026-11-24)
- [All Models are Wrong, but Many are Useful: Learning a Variable's Importance by Studying an Entire Class of Prediction Models Simultaneously](https://arxiv.org/abs/1801.01489), arXiv (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above. Independent source and example-target verification is pending. [Glossary index](https://skillalmanac.com/glossary.md).
