mae – Mean absolute error – (1/N) Σ |y_t - ŷ_t|.#
Back to point_metrics axis | Back to L5 | Browse all options
Operational op under axis
point_metrics, sub-layerL5_A_metric_specification, layerl5. Standalone callable:mf.functions.mae.
Function signature#
mf.functions.mae(
y_true: np.ndarray | pd.Series,
y_pred: np.ndarray | pd.Series,
) -> float
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
`np.ndarray |
pd.Series` |
— |
— |
|
`np.ndarray |
pd.Series` |
— |
— |
Returns#
float — scalar result.
Behavior#
Point-forecast metric mae. L1 loss; robust alternative to MSE. Equally weighs every absolute residual rather than penalising large errors super-linearly. The implicit decision rule under MAE is the median of the predictive distribution (vs the mean for MSE).
When to use
Heavy-tailed targets where extreme errors should not dominate; reporting in target units.
When NOT to use
When the squared-loss decision rule is what the user actually faces.
In recipe context#
Set params.point_metrics = "mae" in the relevant layer to activate this op within a recipe:
# Layer L5 recipe fragment
params:
point_metrics: mae
References#
macroforecast design Part 3, L5: ‘evaluation = (metric × benchmark × aggregation × decomposition × ranking).’
Diebold (2017) ‘Forecasting in Economics, Business, Finance and Beyond’, University of Pennsylvania (free online). https://www.sas.upenn.edu/~fdiebold/Textbooks.html