Absolute and Squared Prediction Loss by Hand

Mean absolute error averages residual magnitudes. Mean squared error averages their squares, giving larger residuals more numerical influence.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace three errors
  2. Check rare large errors
  3. Square each residual before averaging for MSE
  4. Pay attention to units and weighting

Trace three errors

Errors of 0, minus 2, and 4 give MAE 2 and MSE \(20/3\). The former has the target's units and the latter squared units. Units in measurement matter when publishing them.

Check rare large errors

Two predictors can have similar mean absolute error and different squared error when one makes larger rare mistakes. Weighted and unweighted means describe the averaging choices.[1]

Square each residual before averaging for MSE

Suppose three errors are minus two, one and four. Absolute errors are two, one and four, giving MAE \(7/3\). Squared errors are four, one and sixteen, giving MSE seven. See RMSE and MAE.

Residuals: -2,1,4
Magnitudes: 2,1,4, MAE=7/3
Squares: 4,1,16, MSE=21/3=7
Mean signed error: 1

Pay attention to units and weighting

MSE has squared target units. Its square root restores the original scale but still emphasizes large deviations more than MAE. Test a single large error and several small ones.

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩