MAE and RMSE — Which Metric is Better?

Mean Absolute Error versus Root Mean Squared Error

JJ
JJ
Mar 23, 2016 · 4 min read

Definitions

Mean Absolute Error (MAE): MAE measures the average magnitude of the errors in a set of predictions, without considering their direction. It’s the average over the test sample of the absolute differences between prediction and actual observation where all individual differences have equal weight.


Comparison

Similarities: Both MAE and RMSE express average model prediction error in units of the variable of interest. Both metrics can range from 0 to ∞ and are indifferent to the direction of errors. They are negatively-oriented scores, which means lower values are better.

MAE and RMSE for cases of increasing error variance
3,4,5 is a Pythagorean Triple
  1. [RMSE] ≤ [MAE * sqrt(n)], where n is the number of test samples. The difference between RMSE and MAE is greatest when all of the prediction error comes from a single test sample. The squared error then equals to [MAE^2 * n] for that single test sample and 0 for all other samples. Taking the square root, RMSE then equals to [MAE * sqrt(n)].

Conclusion

RMSE has the benefit of penalizing large errors more so can be more appropriate in some cases, for example, if being off by 10 is more than twice as bad as being off by 5. But if being off by 10 is just twice as bad as being off by 5, then MAE is more appropriate.

Human in a Machine World

Stories and reflections on understanding our imminent overlords. The theory and practice of using statistics and computing algorithms.

JJ

Written by

JJ

Thinker and Tinkerer. Figuring out a storyline. http://yahwes.github.io/

Human in a Machine World

Stories and reflections on understanding our imminent overlords. The theory and practice of using statistics and computing algorithms.