Compute mean absolute error
Type each count alongside the label that gives it meaning. · 198 words
Mean absolute error, or MAE, measures the typical size of a regression model's errors. Regression predicts a number, such as tomorrow's temperature. For each case, subtract the actual value from the prediction, then take the absolute value, which removes direction. An error of -4 degrees and one of +4 degrees each have absolute error 4. The mean is the ordinary average. MAE is reported in the target's units, so temperature errors are in degrees. Lower is better, and zero means every prediction was exact.
Suppose a travel app predicts high temperatures of 18, 22, 25, and 30 degrees for four cities. The observed highs are 16, 24, 24, and 27 degrees. The absolute errors are |18 - 16| = 2, |22 - 24| = 2, |25 - 24| = 1, and |30 - 27| = 3 degrees. Add them: 2 + 2 + 1 + 3 = 8. Divide by the four observations: MAE = 8 / 4 = 2 degrees. In plain language, the app's predictions differ from the observed highs by 2 degrees on average. Because MAE keeps errors in their original units, it is easy to explain, although one unusually large error can affect it.
Check your recall
What is the MAE of the travel app's four temperature predictions?
Check your answer
The absolute errors are 2, 2, 1, and 3 degrees. Their sum is 8, so MAE = 8 / 4 = 2 degrees.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Classification metrics.