ets – Exponential Smoothing State-Space (Hyndman-Koehler-Ord-Snyder 2008) – ETS family.#
Back to family axis | Back to L4 | Browse all options
Operational op under axis
family, sub-layerL4_A_model_selection, layerl4. Standalone callable:mf.functions.ets_fit.
Function signature#
mf.functions.ets_fit(
X: np.ndarray | pd.DataFrame,
y: np.ndarray | pd.Series,
) -> ETSFitResult
Parameters#
name |
type |
default |
constraint |
description |
|---|---|---|---|---|
|
`np.ndarray |
pd.DataFrame` |
— |
— |
|
`np.ndarray |
pd.Series` |
— |
— |
Returns#
ETSFitResult — frozen dataclass with fit results.
Attribute |
Type |
Description |
|---|---|---|
|
|
3-character ETS code, e.g. AAN. |
|
|
Number of observations. |
|
|
Forecast, len(X) steps ahead. |
|
|
Table: ETS code and observation count. |
Behavior#
Exponential-smoothing state-space framework: error_trend_seasonal is a 3-character code ETS where E ∈ {A, M} (additive / multiplicative error), T ∈ {A, M, N} (additive / multiplicative / no trend), S ∈ {A, M, N} (additive / multiplicative / no seasonality). Wraps statsmodels.tsa.exponential_smoothing.ets.ETSModel (MLE fitting; auto-selects the closed-form initialisation per Hyndman 2008 §5.4).
Defaults: error_trend_seasonal = 'AAN' (additive error, additive trend, no seasonal – the workhorse non-seasonal spec), seasonal_periods = 12 (monthly), initialization_method = 'estimated'. Auto-disables seasonal fitting when len(y) < 2 · seasonal_periods.
When to use
M-competition baseline; non-seasonal / seasonal univariate forecasting where a state-space exponential-smoothing model is the natural reference.
When NOT to use
Multivariate or covariate-driven forecasting (ETS ignores X); short series where seasonal estimation is unstable.
In recipe context#
Set params.family = "ets" in the relevant layer to activate this op within a recipe:
# Layer L4 recipe fragment
params:
family: ets
References#
macroforecast design Part 2, L4: ‘forecasting model is the layer where every authoring iteration ends – pick family, tune, repeat.’
Hyndman, Koehler, Ord & Snyder (2008) ‘Forecasting with Exponential Smoothing: The State Space Approach’, Springer.
Hyndman & Athanasopoulos (2018) ‘Forecasting: Principles and Practice’, 2nd ed., OTexts §7.