-
Notifications
You must be signed in to change notification settings - Fork 22
Home
The smooth package implements Single Source of Error (SSOE) state-space models for forecasting and time series analysis. It is available for both R (CRAN) and Python (PyPI, port in active development).
-
Glossary — terminology and overloaded names (
arvsar_ordervsARvs"ar", ETS letters, state-component names). - Roadmap — what is R-only or not yet ported to Python.
- R-Python-differences — numerical-parity status between the two implementations.
- Installation — installation instructions.
- Resources — academic references and DOIs.
- llms.txt — machine-readable index of every wiki page (markdown llms.txt spec, with full URLs).
| Function | R | Python | Description |
|---|---|---|---|
| ADAM | adam() |
ADAM |
Unified ETS + ARIMA + regression in SSOE form. |
| AutoADAM | auto.adam() |
AutoADAM |
Automatic distribution and ARIMA-order selection. |
| ES | es() |
ES |
Exponential Smoothing wrapper for ADAM. |
| CES |
ces(), auto.ces()
|
CES, AutoCES
|
Complex Exponential Smoothing. |
| MSARIMA |
msarima(), auto.msarima()
|
MSARIMA, AutoMSARIMA
|
Multiple Seasonal ARIMA. |
| SSARIMA | ssarima() |
— | State Space ARIMA. R-only — see Roadmap. |
| GUM | gum() |
— | Generalised Univariate Model. R-only — see Roadmap. |
| SMA | sma() |
SMA |
Simple Moving Average. |
| OM |
om(), omg(), auto.om(), oes()
|
OM, OMG, AutoOM
|
Occurrence model for intermittent demand. |
| Function | R | Python | Description |
|---|---|---|---|
| msdecompose | msdecompose() |
msdecompose() |
Multiple seasonal decomposition. |
from smooth import ADAM, AutoADAM, ES, msdecompose
# Automatic ETS model selection
model = ADAM(model="ZXZ", lags=12)
model.fit(y)
forecasts = model.predict(h=12)
# Automatic distribution and ARIMA selection
model = AutoADAM(model="ZZZ", lags=[1, 12],
orders={"ar": 2, "i": 2, "ma": 2})
model.fit(y)
# Simple Exponential Smoothing
model = ES(model="ZXZ")
model.fit(y)
# Time series decomposition
result = msdecompose(y, lags=[12], type='additive')library(smooth)
# Automatic model selection
model <- adam(y, model="ZXZ", lags=12)
forecast(model, h=12)
# Automatic distribution and ARIMA selection
model <- auto.adam(y, model="ZZZ",
orders=list(ar=2, i=2, ma=2, select=TRUE),
distribution=c("dnorm","dlaplace","ds"))
# Exponential Smoothing
model <- es(y, model="ZXZ", h=12)ADAM is the entry point for most forecasting tasks. It provides unified ETS + ARIMA + regression, multiple seasonality, several error distributions, intermittent-demand handling, external regressors, and automatic selection.
| Page | Parameters documented |
|---|---|
| Model-Specification |
model, ETS taxonomy, automatic-selection codes |
| Orders-and-Lags |
orders, lags, ar_order / i_order / ma_order
|
| Loss-Functions |
loss (likelihood, MSE, MAE, HAM, multi-step, LASSO, RIDGE, custom) |
| Bounds |
bounds and stability conditions on smoothing parameters |
| Initialisation |
initial (backcasting / optimal / two-stage / complete / provided) |
| Persistence |
persistence (alpha, beta, gamma, delta), phi
|
| Explanatory-Variables |
formula, xreg, X, regressors
|
| Model-Estimation | optimiser, IC, Hessian, advanced options |
| Page | Methods documented |
|---|---|
| Fitted-Values-and-Forecasts |
fitted, actuals, forecast / predict
|
| Coefficients-and-Parameters |
coef, confint, vcov, coefbootstrap
|
| Residuals-and-Errors |
residuals, rstandard, rstudent, rmultistep, multicov, outlierdummy
|
| Likelihood-and-Information-Criteria |
logLik, AIC / BIC / AICc / BICc, accuracy, pls
|
| Model-Information |
nobs, nparam, sigma, modelType, modelName, orders, lags
|
| Visualisation-and-Output |
print, summary, plot, xtable
|
| Refitting-and-Reforecasting |
reapply, reforecast
|
| Scale-Model |
sm — R-only (Roadmap) |
| Simulation-Functions |
sim.* (R) / sim_* (Python) family and the .simulate() method on fitted models |
| Capability | Wiki page |
|---|---|
| Estimate ETS (fixed type) | ADAM, ES |
| ETS model selection (default pool) | ADAM, ES |
| ETS selection from a user-supplied pool | ADAM, ES |
| AIC-weighted combination of ETS forecasts | ADAM, ES |
| ADAMX (fixed regressors) | Explanatory-Variables |
| ADAMX (stepwise regressor selection) | Explanatory-Variables |
| ADAMX (adaptive — time-varying regressor coefficients) | Explanatory-Variables |
| Multiple seasonal ETS (e.g. daily + weekly) | ADAM, ES |
| Point forecasts (mean / median) | Fitted-Values-and-Forecasts |
| Prediction intervals (analytical / simulated / semiparametric) | Fitted-Values-and-Forecasts |
| Cumulative forecasts | Fitted-Values-and-Forecasts |
| ARIMA (fixed orders) | MSARIMA, ADAM |
| ARIMA (automatic order selection) | AutoADAM, MSARIMA |
| Multiple seasonal ARIMA | MSARIMA, ADAM |
| ETS + ARIMA combined | ADAM, AutoADAM |
| Advanced loss functions | Loss-Functions |
| Fixed error distribution | ADAM, ES |
| Automatic distribution selection | AutoADAM |
| Outlier detection (use all) | AutoADAM, ADAM |
| Outlier detection (stepwise) | AutoADAM, ADAM |
| Occurrence model (intermittent demand) | OM |
| Scale model (heteroscedasticity) | Scale-Model — R-only |
| Diagnostic plots | Visualisation-and-Output |
| Multi-step forecast errors | Residuals-and-Errors |
The R and Python implementations produce identical results to machine precision across most outputs (coefficients, log-likelihood, fitted values, residuals, forecasts, information criteria, and vcov / confint / summary for OM, OMG, and ADAM with initial="backcasting"). The remaining gap is on vcov for initial="optimal" / "two-stage" ADAM, at the finite-difference Hessian floor (~1e-3 relative). See R-Python-differences.