Median Absolute Error
What you'll learn: You'll master median absolute error (MedAE), a remarkably robust metric for regression that resists outliers far better than mean-based alternatives.
What Is Median Absolute Error?
Median Absolute Error calculates the median (middle value) of all absolute differences between predictions and actual values, rather than averaging them like MAE does.
Instead of summing errors and dividing by count, MedAE sorts all your errors and picks the middle one. This single change makes it extraordinarily resistant to extreme outliers.
Why This Matters
Think of calculating typical home prices in a neighborhood. If most homes cost 300,000 but one mansion sells for $10 million, the mean gets dragged upward dramatically. The median stays grounded near the typical home value.
MedAE works the same way with prediction errors. A few terrible predictions won't corrupt your evaluation—the median ignores them by design.
When to Prefer MedAE Over MAE or MSE
Use Median Absolute Error when:
- Your data contains extreme outliers that you don't want influencing metric calculation
- You have highly skewed error distributions (most predictions are good, but a few are wildly off)
- You care about typical performance, not average performance
- Outliers exist but shouldn't define model quality (e.g., rare measurement errors in sensor data)
Unlike MSE/RMSE which square errors (amplifying outliers even more) or MAE which still averages them, MedAE simply finds the middle ground—literally.
Key Takeaway: Median Absolute Error is your most outlier-robust regression metric, evaluating typical prediction quality by ignoring extreme errors that would skew mean-based metrics like MAE, MSE, or MAPE.