Past exam question: 2081 Chaitra (Regular), Q7(iv)
Open in the Padhaiko appWrite brief notes on: (Any Three)
(iv) Performance measure using MAE
Solution
Definition and Mathematical Formulation of Mean Absolute Error (MAE): Mean Absolute Error (MAE) is a primary evaluation metric and loss function used in continuous regression tasks to measure the average magnitude of prediction errors without regard to their direction (positive or negative sign).
For a dataset of observations with actual target values and predicted values :
where represents the residual error for the -th observation.
Because the absolute value function strips the signs, positive and negative errors cannot cancel each other out (unlike the raw Mean Error, , which could sum to zero even for an inaccurate model).
Key Properties and Operational Advantages:
- Identical Units to the Target Variable: MAE is expressed in the exact same physical units as the dependent variable (e.g., dollars, degrees Celsius, kilometers). An MAE of on a housing model means predictions deviate by an average of , making it directly interpretable to non-technical business stakeholders.
- Linear Error Penalty: Unlike Mean Squared Error (), which penalizes larger errors quadratically, MAE scales linearly with error size. An error of is penalized exactly twice as much as an error of .
- Robustness to Outliers: Because errors are not squared, a small number of extreme anomalous points or sensor glitches do not dominate or distort the evaluation metric.
Illustrative Numerical Example: MAE vs. MSE and RMSE: Consider 4 model predictions evaluated against ground truth values:
| Observation | Actual | Predicted | Error | Absolute Error | Squared Error |
|---|---|---|---|---|---|
| 1 | 10 | 12 | -2 | 2 | 4 |
| 2 | 20 | 19 | +1 | 1 | 1 |
| 3 | 30 | 33 | -3 | 3 | 9 |
| 4 | 40 | 50 | -10 | 10 | 100 |
| Sum | 16 | 114 |
Computing the metrics:
- Mean Absolute Error:
- Mean Squared Error:
Notice that for the first three observations, errors are modest (). The fourth observation contains a large error (). In , squaring that single error produces ( of the total error sum), heavily inflating the to . In contrast, provides an intuitive, robust representation of typical model accuracy without disproportionate influence from single outliers.
Mean Absolute Error (MAE) measures the average absolute difference between predicted and actual values in regression: . It has the same units as the target variable, penalizes errors linearly, and is robust against extreme outliers compared to squared metrics like MSE and RMSE.