All labs

Importance Depends on the Question

Impurity, permutation, and SHAP-style attributions disagree — especially under correlation.

Ch 11 11.2
Comparator
Validation & Feature Selection
22 mindifficulty 4/5

Controls

150
0.850

Correlation between x1 and its duplicate; the twin has no direct effect on y.

1.500
1
1
0.500

Shrinkage applied when fitting the standardized model.

20

Categories of the impurity-splitting demo below, independent of y.

Random seed

Every result on this page is a deterministic function of the seed and the controls.

Four importance measures, per variable

Bars are normalized within each measure (column) to its own maximum, so widths compare rank, not raw scale.

x1 (true)
marginal
0.757
coef
1.694
permute
3.550
LOCO
0.741
x2 (true)
marginal
0.450
coef
0.926
permute
1.892
LOCO
1.405
x1 twin
marginal
0.631
coef
0.074
permute
0
LOCO
0.004
noise 1
marginal
0.009
coef
0.030
permute
0
LOCO
0
noise 2
marginal
0.006
coef
0.056
permute
0
LOCO
0
marginal |corr||ridge coef|permutationLOCO

Rank table

1 = most important under that measure. Disagreement is the normalized mean pairwise footrule distance.

variablemarginalcoefpermutationLOCO
x1 (true)1112
x2 (true)3221
x1 twin2333
noise 14544
noise 25455

High-cardinality noise wins

A purely random label independent of y still explains variance in y just by chance, more so as the number of categories grows relative to n.

00.050.100.150.200.250.3010203040k=2 baselinecategories in the noise labelapparent variance explained
sweep over categories (averaged)current k (highlighted point)
x1 + twin, coef credit
1.767
The coefficient method splits β1's true effect between correlated copies.
x1 + twin, marginal credit
1.388
Marginal correlation double-counts shared signal instead of splitting it.
Rank disagreement
25%
0% = all four measures agree on every rank
Held-out MSE, full model
0.985
Reference loss for permutation and LOCO
Same variables, four different questions

Marginal correlation asks "how associated is x with y, ignoring everything else" and inflates both members of a correlated pair. The standardized coefficient asks "how much does the fitted model lean on x once the others are in the equation," and with two near-identical columns it can lean on either one arbitrarily and split credit unstably as ρ rises. Permutation importance asks "how much worse do predictions get if x is scrambled," which is small for a twin because the model can lean on its partner instead. LOCO asks "how much worse do predictions get if x is unavailable at refit time," which is smaller still for redundant variables because the refit model routes around the missing column. None of the four is measuring causal contribution.