Feature Importance
Rank predictors by importance to the target variable. Calculates feature importance scores to identify which predictor variables most influence the target.…
Calculates feature importance scores to identify which predictor variables most influence the target. Visualized as a horizontal bar chart ranked by importance.
What Is Feature Importance?
Feature importance quantifies how much each predictor variable contributes to predicting the target variable. It helps identify the most influential factors, simplify models by removing irrelevant features, and gain domain insights into what drives the outcome.
Common methods include correlation-based ranking (absolute Pearson correlation with the target), permutation importance (measuring prediction degradation when a feature's values are shuffled), and model-based importance (e.g., coefficient magnitudes in linear regression, or impurity reduction in tree models).
High feature importance does not necessarily imply causation. Correlated features may share importance, and the ranking can change depending on the method used. It is good practice to compare results from multiple methods and validate against domain knowledge.
Formula: Permutation importance (this tool): R²₀ = R² of the least-squares fit of y on all predictors Shuffle xⱼ, refit, record R²π(j) — 100 shuffles, fixed seed Importance_j = R²₀ − mean R²π(j) Not normalized: scores need not sum to 1; ≈ 0 or slightly negative = no contribution Other methods: |r(xⱼ, y)| (correlation) · |βⱼ| × std(xⱼ) (regression)
Example Calculation
Ten students: study hours 2/4/6/8/10/3/7/5/9/6, sleep hours 6/8/5/7/6/5/8/7/5/8, screen time 3/5/4/2/6/2/5/1/3/4, test score 51/58/58/79/75/50/75/70/73/71. All three predictors together fit R² = 0.98. Shuffling study hours and refitting drops R² by 0.71 on average, sleep hours by 0.19, screen time by 0.07 — study hours matter most. The scores sum to 0.97, not 1, because each is a drop in R², not a share of it. Each score comes with its spread across the 100 shuffles (0.16 for study hours) — on ten rows one shuffle can move it a lot.
When to Use This Calculator
- A data scientist performing feature selection before training a machine learning model to reduce dimensionality and improve performance
- A business analyst identifying which factors most strongly influence a target outcome (e.g., customer churn, defect rate, sales)
- A researcher prioritizing which variables to investigate further based on their predictive importance for the outcome of interest
- An engineer narrowing down dozens of sensor readings or process parameters to the few that actually drive product quality
Common Mistakes to Avoid
- Relying on a single importance method — different methods can produce different rankings, especially for correlated features; compare correlation-based, regression-based, and permutation approaches
- Confusing importance with causation — a feature can be highly important for prediction without being a causal factor; domain expertise is needed to distinguish correlation from causation
- Removing features based solely on low individual importance when interactions matter — two individually weak features may jointly be highly predictive; test feature combinations before removing
- Not normalizing feature scales before regression-based importance — coefficient magnitude depends on the variable's scale; standardize features first or use standardized coefficients
How to Interpret Results
- Features with normalized importance scores above 0.2 are strong contributors — these should definitely be included in any predictive model
- Features with importance scores near zero add little predictive value and are candidates for removal — but verify with cross-validation before dropping
- If the top 2-3 features account for 80%+ of total importance, your target variable is primarily driven by a few key factors — focus improvement efforts there
Related Standards & References
- Breiman, L. (2001), 'Random Forests', Machine Learning 45 — introduced permutation importance, the method used by this tool
- Fisher, Rudin & Dominici (2019), 'All Models are Wrong, but Many are Useful', Journal of Machine Learning Research — model-agnostic permutation importance (model reliance) framework
- Molnar, C., Interpretable Machine Learning — practical guidance on permutation feature importance and its pitfalls with correlated features
Frequently Asked Questions
Why might different importance methods give different rankings?
Each method measures a different aspect of 'importance.' Correlation-based methods capture linear associations. Permutation importance measures predictive contribution in the context of all other features. Model-based importance depends on the model type. Correlated features particularly cause disagreement — one method may attribute all importance to one of two correlated features while another splits it.
Should I remove features with low importance?
Generally yes, but with caution. Removing low-importance features can reduce overfitting, improve model interpretability, and speed up training. However, verify that removal does not significantly degrade model performance using cross-validation. Some features may appear unimportant alone but contribute through interactions with other features.