smooth.AutoMSARIMA

class smooth.AutoMSARIMA(lags=None, ar_order=[3, 3], i_order=[2, 1], ma_order=[3, 3], orders=None, constant=False, initial='backcasting', initial_X=None, ic='AICc', loss='likelihood', h=None, holdout=False, bounds='usual', regressors='use', outliers='ignore', level=0.99, verbose=0, **kwargs)

Automatic Multiple Seasonal ARIMA with order selection.

Wraps AutoADAM with model="NNN" and distribution="dnorm" fixed, providing automatic ARIMA order selection for pure ARIMA (and SARIMA) models without ETS components.

Parameters:
  • lags (Optional[List[int]]) – Seasonal period(s). E.g. lags=[1, 12] for monthly data. If None, defaults to [1] (non-seasonal).

  • ar_order (Union[int, List[int], None]) – Maximum AR order(s) per lag level for selection (one entry per seasonal frequency in lags).

  • i_order (Union[int, List[int], None]) – Maximum integration order(s) per lag level.

  • ma_order (Union[int, List[int], None]) – Maximum MA order(s) per lag level for 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). When provided, ar_order / i_order / ma_order are ignored.

  • constant (Union[bool, float]) – Whether to include a constant (drift) term.

  • initial (Union[str, Dict[str, Any], None]) – Initialisation method or dict of fixed initial values. String options: "backcasting", "optimal", "complete", "two-stage".

  • initial_X (Optional[NDArray]) – Initial values for regressor coefficients (equivalent to R’s initialX).

  • ic (Literal['AIC', 'AICc', 'BIC', 'BICc']) – Information criterion for model comparison during selection.

  • 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.

  • h (Optional[int]) – Forecast horizon. Can also be set in predict().

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

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

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

  • outliers (Literal['ignore', 'use', 'select']) – Outlier handling mode (see AutoADAM).

  • level (float) – Confidence level for outlier detection.

  • verbose (int) – Verbosity level. 0 = silent.

  • **kwargs – Additional arguments forwarded to AutoADAM.

See also

AutoADAM

Full automatic model selection.

MSARIMA

Fixed-order MSARIMA wrapper.

Examples

Automatic non-seasonal ARIMA:

>>> from smooth import AutoMSARIMA
>>> import numpy as np
>>> y = np.cumsum(np.random.randn(100)) + 100.0
>>> model = AutoMSARIMA(lags=[1])
>>> model.fit(y)
>>> print(model)

Automatic seasonal ARIMA for monthly data:

>>> model = AutoMSARIMA(lags=[1, 12])
>>> model.fit(y)
>>> fc = model.predict(h=24)

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).