smooth.AutoADAM

class smooth.AutoADAM(model='ZXZ', lags=None, ar_order=None, i_order=None, ma_order=None, orders=None, arima_select=False, distribution=None, outliers='ignore', level=0.99, constant=False, ic='AICc', loss='likelihood', h=None, holdout=False, bounds='usual', initial='backcasting', regressors='use', verbose=0, ets='conventional', **kwargs)

Automatic ADAM model selection.

Wraps ADAM with automatic selection of ARIMA orders and error distribution.

ETS model selection (ZZZ, ZXZ, FFF, CCC …) is handled by the underlying ADAM machinery and is not duplicated here.

Parameters:
  • model (Union[str, List[str]]) – ETS model specification passed to each internal ADAM fit. Supports all codes accepted by ADAM.

  • lags (Union[int, List[int], None]) – Seasonal period(s). Lag 1 is prepended automatically when absent.

  • ar_order (Union[int, List[int], None]) – Maximum AR order(s) per lag level for ARIMA selection. Defaults to [3, 3] matching R’s auto.adam().

  • i_order (Union[int, List[int], None]) – Maximum integration order(s) per lag level for ARIMA selection. Defaults to [2, 1] matching R’s auto.adam().

  • ma_order (Union[int, List[int], None]) – Maximum MA order(s) per lag level for ARIMA selection.

  • orders (Optional[Dict[str, Any]]) – Dict-style alternative to the scalar max-order arguments above. A dict with keys "ar", "i", "ma" (each an int or list) and optionally "select" (bool). When provided, ar_order / i_order / ma_order are ignored.

  • arima_select (bool) – Whether to perform ARIMA order selection. Unlike ADAM, this defaults to True.

  • distribution (Union[str, List[str], None]) – Distribution(s) to try. When a list is supplied every entry is fitted and the one with lowest IC is kept. A single string uses only that distribution (no selection loop).

  • outliers (Literal['ignore', 'use', 'select']) – Outlier handling mode. "use" and "select" are accepted but not yet implemented; a UserWarning is issued.

  • level (float) – Confidence level for outlier detection (placeholder for future use).

  • ic (Literal['AIC', 'AICc', 'BIC', 'BICc']) – Information criterion used for all model comparisons.

  • loss (Literal['likelihood', 'GPL', 'MSE', 'MAE', 'HAM', 'MSEh', 'MAEh', 'HAMh', 'MSCE', 'MACE', 'CHAM', 'TMSE', 'TMAE', 'THAM', 'GTMSE', 'GTAME', 'GTHAM', 'LASSO', 'RIDGE']) – Loss function for parameter estimation.

  • constant (Union[bool, float]) – Constant/drift term. Overridden by ARIMA selection when arima_select=True (the selection algorithm tests constant on/off).

  • holdout (bool) – Whether to use a holdout sample.

  • h (Optional[int]) – Forecast horizon.

  • bounds (Literal['usual', 'admissible', 'none']) – Parameter bounds type.

  • initial (Union[str, Dict[str, Any], None]) – Initialisation method or fixed initial values.

  • regressors (Literal['use', 'select', 'adapt']) – How to handle external regressors.

  • verbose (int) – Verbosity level for the final model fit. All intermediate selection fits are always silent.

  • **kwargs – Additional arguments forwarded to every internal ADAM fit.

See also

ADAM

Full ADAM model.

ES

ETS-only wrapper.

MSARIMA

Pure ARIMA wrapper.

Examples

Full automatic selection (ETS + ARIMA + distribution):

>>> from smooth import AutoADAM
>>> import numpy as np
>>> y = np.cumsum(np.random.randn(120)) + 100
>>> model = AutoADAM(lags=[12])
>>> model.fit(y)
>>> print(model.model, model.distribution_)

ARIMA-only automatic selection (no ETS):

>>> model = AutoADAM(model="NNN", lags=[1, 12])
>>> model.fit(y)

Fix the distribution, only select ARIMA orders:

>>> model = AutoADAM(distribution="dnorm", lags=[1, 12])
>>> model.fit(y)

References

Methods

coefbootstrap([nsim, size, replace, prob, ...])

Bootstrap the coefficient sampling distribution by refitting subsamples.

confint([parm, level, type, bootstrap, ...])

Confidence intervals for the estimated parameters.

fit(y[, X])

Fit the AutoADAM model.

multicov([type, h, nsim])

Covariance matrix of multi-step-ahead forecast errors.

outlierdummy([level, type])

Detect outliers and return a matrix of indicator dummy variables.

plot([which, level, legend, lowess])

Diagnostic plots for the fitted ADAM model (R: plot.adam).

point_lik([log])

Per-observation log-likelihood of the fitted model.

predict(h[, X, interval, level, side, ...])

Generate forecasts using the fitted ADAM model.

predict_intervals(h[, X, levels, side, nsim])

Generate prediction intervals using the fitted ADAM model.

reapply([nsim, type, bootstrap, heuristics, ...])

Re-run the model on the in-sample data for nsim parameter draws.

reforecast([h, X, occurrence, interval, ...])

Produce h-step-ahead forecasts via Monte-Carlo reforecasting.

rmultistep([h])

Return the (T-h) × h matrix of rolling in-sample multistep forecast errors.

rstandard()

Return standardised residuals.

rstudent()

Return studentised (leave-one-out) residuals.

select_best_model()

Select the best model based on information criteria and update model parameters.

simulate([nsim, seed, obs, randomizer])

Re-simulate obs observations from the fitted model.

summary([level, digits, type])

Generate a coefficient-table summary of the fitted model.

vcov([type, bootstrap, heuristics, step_size])

Variance-covariance matrix of the estimated parameters.

Attributes

actuals

Return original in-sample data.

aic

Return Akaike Information Criterion.

aicc

Return corrected Akaike Information Criterion.

b_value

$B).

bic

Return Bayesian Information Criterion.

bicc

Return corrected Bayesian Information Criterion.

coef

Return estimated coefficients (parameter vector B).

coef_names

Parameter names aligned with coef (the B vector).

constant_value

$constant).

data

$data).

distribution_

$distribution).

error_type

'A' (additive) or 'M' (multiplicative).

fisher_information_

Observed Fisher Information matrix at the estimated parameters.

fitted

Return in-sample fitted values.

holdout_data

$holdout).

ic_weights

$ICw).

initial_type

$initialType).

initial_value

$initial).

is_combined

Return True if model is a combination of multiple models.

lags_used

Return the vector of lags used in the model.

loglik

Return log-likelihood of the fitted model.

loss_

$loss).

loss_value

$lossValue).

measurement

$measurement).

model_name

modelName()).

model_type

Return ETS model type code (e.g., 'AAN', 'AAA', 'MAdM').

models

$models).

n_param

$nParam).

nobs

Return number of observations used for fitting.

nparam

Return number of estimated parameters.

om_model

Fitted occurrence model (OM / OMG / AutoOM), or None.

orders

Return ARIMA orders as dict with 'ar', 'i', 'ma' keys.

persistence_vector

$persistence).

phi_

$phi).

profile

$profile).

residuals

Return model residuals (errors from fitting).

scale

Internal optimisation scale of the error distribution (R: adam_obj$scale).

sigma

sigma(adam_obj)).

states

$states).

time_elapsed

Time taken to fit the model in seconds.

transition

$transition).