AutoETS
chronax.models.AutoETS ยท inherits BaseForecaster
Automatic Exponential Smoothing model. Automatically selects the best ETS (Error, Trend, Seasonality) model using an information criterion. Default is Akaike Information Criterion (AICc), while particular models are estimated using maximum likelihood. The state-space equations can be determined based on their $M$ multiplicative, $A$ additive, $Z$ optimized or $N$ ommited components. The model string parameter defines the ETS equations: E in [$M, A, Z$], T in [$N, A, M, Z$], and S in [$N, A, M, Z$].
__init__(self, season_length=1, model='ZZZ', damped=None, phi=None, max_iter=None, optax_lr=0.07, optax_clip=5.0, early_stop_patience=10, early_stop_min_delta=1e-05, alias='AutoETS', prediction_intervals=None)
Initialize the AutoETS estimator configuration.
| Parameter | Type | Default | Description |
|---|---|---|---|
season_length |
int |
1 |
Number of observations per unit of time. Ex: 24 Hourly data. |
model |
str |
"ZZZ" |
Controlling state-space-equations. |
damped |
Optional[bool] |
None |
A parameter that 'dampens' the trend. |
phi |
Optional[float] |
None |
Smoothing parameter for trend damping. Only used when damped=True. |
max_iter |
Optional[int] |
None |
(undocumented) |
optax_lr |
float |
7e-2 |
(undocumented) |
optax_clip |
float |
5.0 |
(undocumented) |
early_stop_patience |
int |
10 |
(undocumented) |
early_stop_min_delta |
float |
1e-5 |
(undocumented) |
alias |
str |
"AutoETS" |
Custom name of the model. |
prediction_intervals |
Optional[ConformalIntervals] |
None |
Information to compute conformal prediction intervals. By default, the model will compute the native prediction intervals. |
fit(self, y, X=None) -> Self
Fit the Exponential Smoothing model.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | Clean time series of shape (t, ). |
X |
Optional[jnp.ndarray] |
None |
Optional exogenous of shape (t, n_x). |
Returns: Self (the fitted forecaster; sets self.model_).
predict(self, h, X=None, level=None) -> dict[str, jnp.ndarray]
Predict with fitted Exponential Smoothing.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
h |
int |
- | Forecast horizon. |
X |
Optional[jnp.ndarray] |
None |
Optional exogenous of shape (h, n_x). |
level |
Optional[List[int]] |
None |
Confidence levels (0-100) for prediction intervals. |
Returns: dict[str, jnp.ndarray] (Dictionary with entries mean for point predictions and level_* for probabilistic predictions. Keys include mean, and if level is provided, lo-L and hi-L for each level L).
predict_in_sample(self, level=None) -> dict[str, jnp.ndarray]
Access fitted Exponential Smoothing insample predictions.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
level |
Optional[List[int]] |
None |
Confidence levels (0-100) for prediction intervals. |
Returns: dict[str, jnp.ndarray] (Dictionary with entries fitted for point predictions and level_* for probabilistic predictions. Keys include fitted, and if level is provided, fitted-lo-L and fitted-hi-L for each level L).
forecast(self, y, h, X=None, X_future=None, level=None, fitted=False) -> dict[str, Any]
Memory Efficient Exponential Smoothing predictions.
This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | Clean time series of shape (n, ). |
h |
int |
- | Forecast horizon. |
X |
Optional[jnp.ndarray] |
None |
Optional insample exogenpus of shape (t, n_x). |
X_future |
Optional[jnp.ndarray] |
None |
Optional exogenous of shape (h, n_x). |
level |
Optional[List[int]] |
None |
Confidence levels (0-100) for prediction intervals. |
fitted |
bool |
False |
Whether or not returns insample predictions. |
Returns: dict[str, Any] (Dictionary with entries mean for point predictions and level_* for probabilistic predictions. If fitted=True, also includes fitted and fitted prediction intervals).
forward(self, y, h, X=None, X_future=None, level=None, fitted=False) -> dict[str, Any]
Apply fitted Exponential Smoothing model to a new time series.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | Clean time series of shape (n, ). |
h |
int |
- | Forecast horizon. |
X |
Optional[jnp.ndarray] |
None |
Optional insample exogenpus of shape (t, n_x). |
X_future |
Optional[jnp.ndarray] |
None |
Optional exogenous of shape (h, n_x). |
level |
Optional[List[int]] |
None |
Confidence levels for prediction intervals. |
fitted |
bool |
False |
Whether or not to return insample predictions. |
Returns: dict[str, Any] (Dictionary with entries mean for point predictions and level_* for probabilistic predictions. If fitted=True, also includes fitted and fitted prediction intervals).