mse – Mean squared 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.mse.
Function signature#
mf.functions.mse(
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 mse. The classical quadratic-loss metric. Optimal under Gaussian-residual / squared-loss decision theory; the L4 fit objective for OLS / ridge / elastic net is its in-sample version. MSE penalises large residuals super-linearly, so a single outlier in the OOS sample can dominate the score.
When to use
Default for Gaussian-residual problems; horse-race ranking under squared-loss decision rules.
When NOT to use
Heavy-tailed forecast errors – a single outlier dominates the score; consider MAE or MedAE instead.
In recipe context#
Set params.point_metrics = "mse" in the relevant layer to activate this op within a recipe:
# Layer L5 recipe fragment
params:
point_metrics: mse
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