auto_ets: Automatic Model Selection

View source: R/selection.R

auto_etsR Documentation

Automatic Model Selection

Description

Automatic model selection based on choice of criteria.

Usage

auto_ets(
  y,
  xreg = NULL,
  transformation = NULL,
  lambda = NULL,
  lower = 0,
  upper = 1,
  metric = "AIC",
  frequency = NULL,
  normalized_seasonality = TRUE,
  additive_only = FALSE,
  solver = "nlminb",
  control = list(trace = 0, maxit = 1000),
  power_model = FALSE,
  include_damped = TRUE,
  trace = FALSE,
  return_table = FALSE,
  scale = FALSE,
  seasonal_init = "fixed",
  autodiff = TRUE,
  ...
)

Arguments

y

an xts vector.

xreg

an optional xts matrix of regressors (pre-lagged).

transformation

a valid transformation for y from the “tstransform” function in the “tsaux” package (currently box-cox or logit are available) applied to additive models only.

lambda

the Box Cox power parameter (lambda). If NA will estimate this using the method of Guerrero.

lower

the lower bound for the transformation.

upper

the upper bound for the transformation.

metric

the selection metric to use. Valid metrics are ‘AIC’, ‘BIC’, ‘AICc’, ‘MASE’ and ‘MAPE’. If lambda is not NULL, then those models which admit a Box-Cox transformation (additive error models) will not be comparable with the other models.

frequency

the frequency of y (if using a seasonal model).

normalized_seasonality

whether to impose Roberts-McKenzie normalized seasonality.

additive_only

whether to limit to additive models only.

solver

the solver to use for estimation.

control

the solver control parameters.

power_model

whether to include the power MAM models.

include_damped

whether to include damped models in the selection.

trace

whether to show the progress bar. The user is expected to have set up appropriate handlers for this using the “progressr” package.

return_table

whether to return the table with the enumerated options, ranked by metric,for each combination of those options used.

scale

whether to rescale the data using y/max(y) (only for additive models). This sometimes helps in the optimization.

seasonal_init

whether the initial seasonal states are estimated or fixed (set to a backcast approximation).

autodiff

whether to use automatic differentiation (see estimate.tsets.spec).

...

not used.

Details

The function estimates a number of different models from the class of valid ETS models in the packages, with and without dampening, with and without a power term (for MAM and MAN models).

Value

An object of class “tsets.estimate” which also inherits class “tsets.select”

Note

The function can use parallel functionality as long as the user has set up a plan using the future package.


tsmodels/tsets documentation built on Oct. 8, 2022, 9:15 a.m.