smooth.AutoOM

class smooth.AutoOM(model='ZXZ', lags=None, orders=None, occurrence=['fixed', 'odds-ratio', 'inverse-odds-ratio', 'direct', 'general'], h=0, holdout=False, persistence=None, phi=None, initial='backcasting', constant=False, arma=None, regressors='use', ic='AICc', bounds='usual', verbose=0, nlopt_kargs=None, ets='conventional')

Automatic occurrence model selection — port of R’s auto.om().

Fits an OM (or OMG) for each entry in occurrence and returns the best-fitting model (lowest IC) directly. The returned object is a plain OM or OMG with one extra attribute time_elapsed_ (total selection time in seconds), matching R’s $timeElapsed on the returned om object.

Parameters:
  • model (str) – ETS spec passed to every candidate, including both sub-models of the general (OMG) candidate.

  • lags (Optional[List[int]]) – Seasonal lags shared across all candidates.

  • orders (Optional[Dict[str, Any]]) – ARIMA orders forwarded to every candidate.

  • occurrence (Union[List[str], str]) – Sequence of occurrence types to try.

  • h (int) – Forecast horizon and holdout flag forwarded to every candidate.

  • holdout (bool) – Forecast horizon and holdout flag forwarded to every candidate.

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

Methods

fit(y[, X])

Fit all candidates and return the best model by IC.