smooth.OM
- class smooth.OM(model='ZXZ', lags=None, ar_order=0, i_order=0, ma_order=0, orders=None, constant=False, formula=None, regressors='use', occurrence='odds-ratio', loss='likelihood', reg_lambda=None, h=0, holdout=False, persistence=None, phi=None, initial='backcasting', n_iterations=None, arma=None, ic='AICc', bounds='usual', verbose=0, nlopt_kwargs=None, ets='conventional', smoother='default', **kwargs)
Occurrence model — state-space model for the probability of demand occurrence.
Inherits the ADAM API surface and overrides the bits that differ for an occurrence model: cost function (Bernoulli likelihood applied to the link-transformed fitted values), distribution (always
"plogis"), scale (nan), and model-name format ("oETS(...)[F|O|I|D]").
Methods
|
Bootstrap the coefficient sampling distribution by refitting subsamples. |
|
Confidence intervals for the estimated parameters. |
|
Fit the ADAM model to time series data. |
|
Covariance matrix of multi-step-ahead forecast errors. |
|
Detect outliers and return a matrix of indicator dummy variables. |
|
Diagnostic plots for the fitted ADAM model (R: |
|
Per-observation log-likelihood of the occurrence model. |
|
Probability forecast for the occurrence model. |
|
Generate prediction intervals using the fitted ADAM model. |
|
Re-run the model on the in-sample data for |
|
Produce |
|
Return the (T-h) × h matrix of rolling in-sample multistep forecast errors. |
Pearson standardised residuals for the occurrence model. |
|
|
Pearson studentised (leave-one-out) residuals for the occurrence model. |
Select the best model based on information criteria and update model parameters. |
|
|
Re-simulate probabilities + 0/1 occurrence indicators. |
|
Coefficient-table summary, mirroring R's |
|
Variance-covariance matrix of the estimated parameters. |
Attributes
In-sample actuals. |
|
Return Akaike Information Criterion. |
|
Return corrected Akaike Information Criterion. |
|
$B). |
|
Return Bayesian Information Criterion. |
|
Return corrected Bayesian Information Criterion. |
|
Return estimated coefficients (parameter vector B). |
|
Parameter names aligned with |
|
$constant). |
|
$data). |
|
Always |
|
'A' (additive) or 'M' (multiplicative). |
|
Observed Fisher Information matrix at the estimated parameters. |
|
In-sample fitted probabilities in [0, 1]. |
|
$holdout). |
|
$ICw). |
|
$initialType). |
|
$initial). |
|
Return True if model is a combination of multiple models. |
|
Return the vector of lags used in the model. |
|
Return log-likelihood of the fitted model. |
|
$loss). |
|
$lossValue). |
|
$measurement). |
|
Model name in |
|
Return ETS model type code (e.g., 'AAN', 'AAA', 'MAdM'). |
|
$models). |
|
$nParam). |
|
Return number of observations used for fitting. |
|
Return number of estimated parameters. |
|
Occurrence type used for fitting (e.g. |
|
Single-letter occurrence flag handed to the C++ fitter. |
|
Fitted occurrence model (OM / OMG / AutoOM), or None. |
|
Return ARIMA orders as dict with 'ar', 'i', 'ma' keys. |
|
$persistence). |
|
$phi). |
|
$profile). |
|
|
|
Link-scale residual std-dev — alias for |
|
|
|
$states). |
|
Time taken to fit the model in seconds. |
|
$transition). |