-
Notifications
You must be signed in to change notification settings - Fork 22
Model Specification
This page documents the model parameter used across smooth functions, along with methods for extracting model type information. This applies to ADAM and ES models.
| Field | Value |
|---|---|
| Argument name | model |
| Type | string, list of strings, or (R only) a previously fitted model object |
| Valid values | A concrete ETS code (e.g. "ANN", "AAdM") or a selection code ("ZZZ", "ZXZ", "XXX", "YYY", "FFF", "PPP", "SSS", "CCC"); or a vector / list of concrete codes. |
| Default | "ZXZ" |
| Applies to | R: adam, auto.adam, es. Python: ADAM, AutoADAM, ES. |
| Related arguments |
lags= (seasonal periods), distribution= (error distribution), phi= (damping). |
Read more in Section 15.1 and Section 15.4 of Svetunkov (2023).
The model parameter specifies the type of ETS model to estimate. This is a 3-4 character string describing Error, Trend, and Seasonal components.
The model string follows the pattern "ETS" where:
| Component order | Component | Options | Description |
|---|---|---|---|
| 1st | Error |
A, M
|
Additive or Multiplicative errors |
| 2nd | Trend |
N, A, Ad, M, Md
|
None, Additive, Additive damped, Multiplicative, Multiplicative damped |
| 3rd | Seasonal |
N, A, M
|
None, Additive, Multiplicative |
| Model | Name | Description |
|---|---|---|
"ANN" |
Simple Exponential Smoothing | Level only, additive errors |
"AAN" |
Holt's Linear | Level + additive trend |
"AAdN" |
Damped Holt's | Level + damped additive trend |
"AAA" |
Holt-Winters Additive | Additive trend and seasonality |
"AAdA" |
Damped Holt-Winters Additive | Damped trend with additive seasonality |
"MAM" |
Holt-Winters Multiplicative | Multiplicative errors with additive trend and multiplicative seasonality |
"MMM" |
Fully Multiplicative | All components multiplicative |
The model parameter accepts special codes for automatic model selection:
| Code | Description | Use Case |
|---|---|---|
"ZZZ" |
Select best using Branch & Bound | General automatic selection. Includes multiplicative trends |
"ZXZ" |
Auto-select error and seasonal, additive trend only | Default, safer option |
"XXX" |
Test only additive components | When multiplicative is inappropriate |
"YYY" |
Test only multiplicative components | Positive data with low values |
"FFF" |
Full exhaustive search (all 30 ETS models) | Most thorough, slowest |
"PPP" |
Pure additive vs pure multiplicative only | Avoids mixed models |
"SSS" |
Pool of 19 standard sensible models | Avoids models with infinite variances |
"CCC" |
Combine forecasts using IC weights | Ensemble forecasting |
Selection codes can be combined. For example:
-
"ZXZ"- Auto error, additive-only trend, auto seasonal -
"SXS"- Standard pool with additive-only trend (likeets()fromforecastpackage) -
"CCN"- Combine non-seasonal models -
"CAY"- Combine models with additive trend, multiplicative-or-none seasonality
You can provide a vector of specific models to test:
# R: Test specific models only
model <- adam(y, model=c("ANN", "AAN", "AAA"), lags=12)# Python: Test specific models only
model = ADAM(model=["ANN", "AAN", "AAA"], lags=12)A previously estimated model can be passed directly:
# R: Reuse model structure
model1 <- adam(y1, model="MAM", lags=12)
model2 <- adam(y2, model=model1) # Same structure, re-estimated on new data| Feature | R | Python |
|---|---|---|
| Model string | Yes | Yes |
| Selection codes (Z, X, Y, F, P, S, C) | Yes | Yes |
| Model vector | Yes | Yes (as list) |
| Reuse previous model | Yes | Not supported (see Roadmap) |
-
Default choice: Use
"ZXZ"- it avoids the explosive multiplicative trend while still allowing automatic selection of error and seasonal components. -
Positive data: Consider
"YYY"for positive data with low values (e.g., slow-moving products). -
Known seasonality: If you know the data has additive seasonality, use
"XXA"or similar. -
Ensemble forecasts: Use
"CCC"to combine forecasts from multiple models. -
Exhaustive search: Use
"FFF"only when you need the absolute best model and have time for computation.
Extracts the type of the estimated ETS model.
# ETS model
model <- adam(AirPassengers, "MMM", lags=12)
modelType(model) # "MMM"
# With damping
model <- adam(AirPassengers, "MAdM", lags=12)
modelType(model) # "MAdM"
# CES model
model <- ces(AirPassengers, "f")
modelType(model) # "CES(f)"from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Get model type
model_type = model.model_type # "MMM"Returns a character/string representing the model type:
- For ETS:
"ANN","MAM","MAdM", etc. - For CES:
"CES(n)","CES(s)","CES(p)","CES(f)" - For ARIMA:
"NNN"(no ETS components)
Returns the full descriptive name of the fitted model.
# ETS model
model <- adam(AirPassengers, "MMM", lags=12)
modelName(model) # "ETS(M,M,M)"
# ARIMA
model <- adam(BJsales, "NNN", orders=list(ar=1, i=1, ma=1))
modelName(model) # "ARIMA(1,1,1)"
# Combined ETS+ARIMA
model <- adam(AirPassengers, "AAN", lags=12, orders=c(1,0,1))
modelName(model) # "ETS(A,A,N)+ARIMA(1,0,1)"from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Get full model name
name = model.model_name # "ETS(MMM)"Returns a human-readable character/string:
-
"ETS(A,A,N)"or"ETS(AAN)"- ETS model with explicit component names -
"ARIMA(1,1,1)"- ARIMA with orders -
"ETS(A,A,N)+ARIMA(1,0,1)"- Combined model -
"CES(full)"- CES with seasonality type
Extracts the type of error term: additive ("A") or multiplicative ("M").
model <- adam(AirPassengers, "MMM", lags=12)
errorType(model) # "M"
model <- adam(AirPassengers, "AAN", lags=12)
errorType(model) # "A"from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Get error type
error = model.error_type # "M"Returns a single character/string:
-
"A"- Additive errors (model estimated on original scale) -
"M"- Multiplicative errors (percentage errors)
The ets parameter determines which ETS formulation to use:
| Value | Description |
|---|---|
"conventional" |
Hyndman et al. (2008) formulation (default) |
"adam" |
ADAM reformulation with different multiplicative component updates |
The "adam" formulation updates multiplicative components differently, making the trend less explosive. It is closer to applying ETS to log-transformed data.
# Use ADAM formulation
model <- adam(y, model="MMM", lags=12, ets="adam")from smooth import ADAM
# Use ADAM ETS formulation (less explosive multiplicative trends)
m = ADAM(model="MMM", lags=[12], ets="adam")
m.fit(y)- Svetunkov, I. (2023). Forecasting and Analytics with the Augmented Dynamic Adaptive Model (ADAM). Chapman and Hall/CRC. Online book: https://openforecast.org/adam/
- Hyndman, R.J., et al. (2008). Forecasting with Exponential Smoothing: The State Space Approach. Springer.
- Kolassa, S. (2011). Combining exponential smoothing forecasts using Akaike weights. International Journal of Forecasting, 27, 238-251.
- ADAM - Main ADAM function
- ES - Exponential Smoothing wrapper
- Orders-and-Lags - ARIMA orders and seasonal lags
- Likelihood-and-Information-Criteria - Model selection criteria