Mean absolute error: the metric that stays in the unit of the target

53 min
Block 16 — The regression metrics
Objective
define MAE = (1/n) Σ |y − ŷ|, establish that its unit is the unit of the target — "off by $58,691 on an apartment worth $591,687" — and prove that the constant minimizing it is the median, flat on [553.71, 560.82] here; derive the consequence that an MAE-trained model estimates the conditional median, recovering 139.84 against a true 140.00 where least squares returns 158.74; measure robustness at Δ = 6,400, MAE ×1.73 against RMSE ×6.79; exhibit the kink at zero, its subdifferential [−1, 1] and its cost, 76 iterations against 7; document sample_weight, multioutput and the neg_mean_absolute_error sign; supply the missing baseline, 226.48 against 58.69, an improvement of 74.09 percent; price a weighted fit at $176,536 against $184,505; state the linear-cost assumption and exhibit a case where MAE prefers the model with twelve catastrophic errors; find 17 apartments under-predicted 17 times out of 17 behind an aggregate of 58.69; and attach a bootstrap interval of $50,768 to $67,055.
Estimated duration
120 minutes
Prerequisites
chapters 010, 021, 026, 029, 030, 044, 045, 047 and 066
Associated quizzes
067.1-quiz-definition-and-units.md to 067.9-quiz-reporting-mae.md

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Regression Metrics” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one