Mean Absolute Error (MAE)
What you'll learn: How to measure regression model accuracy by calculating the average absolute difference between predictions and actual values.
What is MAE?
Mean Absolute Error (MAE) is one of the most intuitive metrics for evaluating regression models. It measures how far off your predictions are from the true values, on average, without caring whether the error is positive or negative.
Think of it like measuring how far darts land from the bullseye. You don't care if they're above or below, left or right—just the total distance from the target. Then you average those distances.
The Core Idea
MAE takes each prediction, subtracts the actual target value, takes the absolute value (making negatives positive), and averages all these absolute errors:
MAE = (1/n) × Σ|predicted - actual|
Where n is the number of predictions.
Example: If you predict house prices of [200K, 300K, 400K] and the actual prices are [210K, 290K, 420K], your absolute errors are [10K, 10K, 20K]. The MAE = (10 + 10 + 20) / 3 = 13.33K.
Interpretation
MAE is expressed in the same units as your target variable. If predicting prices in dollars, MAE is in dollars. An MAE of 5 means your predictions are off by 5 units on average—simple and interpretable.
Robustness to Outliers
Unlike squared error metrics, MAE treats all errors equally. A prediction that's off by 100 has 10× the impact of one that's off by 10, not 100×. This makes MAE robust to outliers—extreme errors don't dominate the metric.
Key Takeaway: MAE measures average prediction error in the original units, is highly interpretable, and handles outliers more gracefully than squared error metrics.