Reading a Regression: MAE, MSE, RMSE and R²

A regression model predicts a number, so judging it means measuring how far its predictions land from the truth. Four measures come up again and again, and each tells a different story.

The errors

  • MAE, the mean absolute error: the average size of a miss, in the target's own unit.

  • MSE, the mean squared error: squares every miss first, so a few large misses weigh heavily.

  • RMSE, the square root of the MSE: back in the target's unit, still strict on large misses.

R², the share explained

R² compares the model with a baseline that always predicts the mean. An R² of 1 means a perfect fit, 0 means no better than the mean, and a negative R² means worse than it.

Which one to report

Report more than one. MAE is the easiest to explain, RMSE warns about large misses, and R² tells how much of the variation the model captures. Always measure them on data the model was not trained on.

From 960 MiB to 9 MiB: Rewriting Three Quiet Lab Services in Rust

Searching Smarter: From BFS and DFS to A*

K-Nearest Neighbors, One Neighbor at a Time

More