Log inStart free
LESSON 4.58 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Feature importance and permutation importance

Watch two feature scores of one boosted model disagree.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 4.58 · IMPORTANCE BAYTEST RMSE 22.4 K$ · TRAIN 3.1 K$
01
Stage 1 of 6 · Fit the model
A gradient boosting model of 30 trees predicts each price. Its RMSE is 22.4 k$ on the 24 test rows.
Explain it simply

Each row is one house. The teal cells are its size, distance, age, house number and price. The blue cell is the model's guess, and the red bar shows how far off it is. On new houses the error is 22.4 thousand dollars, but on the training houses only 3.1. The house number has no effect on the price.

A table of 24 test houses: price, prediction and error. The RMSE is 22.4 k$.

features and pricepredictionerror and error risesplit gaindropped feature
sizedist.ageno.pricepred.error0255075100RMSE (k$)training rows3.1 k$test rows22.4 k$RMSE: training vs test rowsRMSE on test rows = 22.4 k$test rows: 24 housessizedist.ageno.pricepred.error0255075100RMSE (k$)training rows3.1 k$test rows22.4 k$RMSE: training vs test rowsRMSE on test rows = 22.4 k$test rows: 24 houses
Toy: 48 seeded houses · 4 features · 30 trees
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
RMSE=1n∑i(yi−y^i)2\sy{e}{grad}{\text{RMSE}} = \sqrt{\tfrac{1}{n}\textstyle\sum_i (\sy{y}{data}{y_i} - \sy{yh}{out}{\hat y_i})^2}
RMSE=124⋅12007=22.37 k$\text{RMSE} = \sqrt{\tfrac{1}{24} \cdot 12007} = 22.37\ \text{k\$}

The RMSE is the typical size of one prediction error.

Common mix-ups

MYTHA feature with a large split gain helps on new houses.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If the house number is shuffled, does the test RMSE rise a lot?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.