Conformalized Forecasting using Machine Leaning models

mlf(
  y,
  h = 5,
  level = 95,
  lags = 15L,
  fit_func = ahead::ridge,
  predict_func = predict,
  stack = FALSE,
  stacking_models = NULL,
  coeffs = NULL,
  type_pi = c("surrogate", "bootstrap", "kde"),
  B = 250L,
  agg = c("mean", "median"),
  seed = 123,
  show_progress = TRUE,
  ...
)

Arguments

y

A numeric vector or time series of class ts

h

Forecasting horizon

level

Confidence level for prediction intervals

lags

Number of lags of the input time series considered in the regression

fit_func

Fitting function (Statistical/ML model). Default is Ridge regression.

predict_func

Prediction function (Statistical/ML model)

stack

Boolean, use stacking regression or not

stacking_models

A list of fit_funcs and predict_funcs for and ensemble of stacked models (you should set stack=TRUE)

coeffs

Coefficients of the fitted model. If provided, a linear combination with the coefficients is used to compute the prediction.

type_pi

Type of prediction interval

B

Number of bootstrap replications or number of simulations

agg

"mean" or "median" (aggregation method)

show_progress

show progress bar for stacking, if stacking_models if not NULL

...

additional parameters passed to the fitting function fit_func

Value

An object of class 'forecast'