mojolearn.DampedETS#
- class mojolearn.DampedETS(season_length=1, error='A', alpha=None, beta=None, phi=None, numeric_mode=None)[source]#
Bases:
ETSHolt’s damped additive trend model, ETS(A,Ad,N).
ETSwithmodel=error + "AN"anddamped=True: a damped additive trend and no season. Seterror="M"for multiplicative errors (strictly positive data).- Parameters:
season_length (int, default 1) – Number of observations per season (no season is fitted).
error ({“A”, “M”}, default “A”) – Additive or multiplicative errors.
alpha, beta, phi (float or None, default None) – Fix the level, trend and damping smoothing parameters; None estimates each.
numeric_mode (str or None, default None) – Numeric mode for this model (
'identical','deterministic'or'fast'); None uses the process default (seemojolearn.set_numeric_mode()).
- Variables:
info_ (ndarray of shape (batch_size, 10), float32) – Per-series fit summary. Set by predict().
Examples
>>> import numpy as np, mojolearn >>> y = (100 + np.cumsum(np.random.default_rng(0).normal(1, 2, 80))).astype(np.float32) >>> mojolearn.DampedETS().fit(y).predict(10)["mean"].shape (10,)
Methods
fit(y[, X])Check and store one series or a batch of series.
forecast(y, h[, X, X_future, level, fitted])Fit
yand forecasthsteps in one call.predict(h[, X, level])Fit the model and forecast h steps ahead.