Fit univariate time series using caret ML model (for use with dynrmf)

fit_func(
  x,
  y,
  method = "ranger",
  initial_window = 10L,
  horizon = 10L,
  fixed_window = FALSE,
  tune_length = 5,
  summary_function = NULL,
  verbose = TRUE
)

Arguments

x

A matrix of predictors

y

A vector of responses

method

The caret method to use for fitting the model

initial_window

The initial window size

horizon

The forecast horizon

fixed_window

Whether to use a fixed window size

tune_length

Length of the tuning grid

verbose

Whether to print the model summary

Value

A model object