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

Common Mistakes to Avoid

How to Interpret Results

Related Standards & References

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.