100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Machine Learning with Scikit-learn
25 minintermediate

Regression Evaluation — MAE, RMSE, and R2

Evaluating regression models requires metrics that quantify how close predictions are to actual values, and different metrics capture different aspects of that closeness. Mean Absolute Error treats all prediction errors equally; Root Mean Squared Error penalises large errors disproportionately; R-squared measures how much of the target's variability the model explains relative to a naive baseline. None of these is universally best — the right choice depends entirely on what kinds of errors are most costly in the specific application.

Understanding not just how to compute these metrics but how to interpret them, how they relate to each other, and when each is appropriate is what distinguishes a data scientist who can align model evaluation with business reality from one who reports metrics by rote. This lesson also covers the mean absolute percentage error and median absolute error as alternatives, and introduces the critical practice of comparing model metrics against a naive baseline to establish whether any learning has actually occurred.

Analogy🏏Cricket
🏏 Think of it like cricket: A batting coach who teaches only one shot — the forward defensive — gives advice with high bias: it is consistently wrong for deliveries that demand a drive or a pull, regardless of how much practice the batsman does. A coach who memorises every ball of the batsman's training career gives advice with high variance: he predicts each training ball perfectly but fails completely on new balls from a different bowler, because he learned the noise of that specific bowler rather than the underlying principles. The great coach finds the balance — teaching the core principles that generalise, without over-specifying for the particular training environment. Just as great coaching lies between the extremes, great ML models balance bias and variance.
Lesson 10 of 35
0% complete