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=7e-2, 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.
Fit an Exponential Smoothing model to a time series (numpy array) y and optionally exogenous variables (numpy array) X.
| 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.
| 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.)
Return Keys:
* mean: jnp.ndarray
* lo-L: jnp.ndarray (if level is provided)
* hi-L: jnp.ndarray (if level is provided)
predict_in_sample(self, level=None) -> dict[str, jnp.ndarray]
Access fitted Exponential Smoothing insample predictions.
| 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.)
Return Keys:
* fitted: jnp.ndarray
* fitted-lo-L: jnp.ndarray (if level is provided)
* fitted-hi-L: jnp.ndarray (if level is provided)
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.
| 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.)
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.
| 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.)