← AI Terminology
MAE - Mean Absolute Error
Mean Absolute Error (MAE) is a regression evaluation metric that measures the average absolute difference between predicted and actual values — giving equal weight to all errors regardless of their direction.
It is one of the two most common regression metrics alongside MSE.
It is one of the two most common regression metrics alongside MSE.
Why It Matters in AI
MAE is interpretable: an MAE of 5.2 means predictions are off by 5.2 units on average in the same units as the target. Unlike MSE, MAE does not disproportionately penalise large errors — making it appropriate when outliers exist in the target distribution and shouldn't dominate the metric. It is the preferred metric when the cost of an error scales linearly with its magnitude (e.g. delivery time predictions, temperature forecasting).
Key Points
| Aspect | Description |
|---|---|
| MedAE | Median Absolute Error — even more robust to outliers than MAE |
| Range | [0, ∞) — 0 = perfect predictions |
| Units | Same units as the target variable — directly interpretable |
| vs MSE | MAE is robust to outliers; MSE penalises large errors more (squares them) — more sensitive |
| Formula | MAE = (1/n) × Σ |
| L1 loss | MAE is the same as L1 loss used in model training |
Simple Analogy
A delivery company measuring driver accuracy: MAE is the average number of minutes each delivery was late or early, regardless of direction. A driver who is 10 minutes early or 10 minutes late both contribute equally — no penalty for large misses beyond their actual size.
Common Usage Examples
sklearn.metrics.mean_absolute_error(y_true, y_pred)— standard scikit-learn evaluationloss = nn.L1Loss()(predictions, targets)— MAE as training loss in PyTorchkeras.losses.MeanAbsoluteError()— Keras MAE loss for regression training- Weather forecasting: MAE in °C is the standard metric for temperature prediction accuracy
- Time series:
mae = np.mean(np.abs(forecast - actuals))— common evaluation in demand forecasting
Summary
In short: MAE is the average magnitude of prediction errors — interpretable in target units, robust to outliers, and the right regression metric when all error sizes matter equally.