bonsai_cv_models: Uses cross validation with a list of functions

Description Usage Arguments Details Value Author(s)

Description

Commodity function to facilitate the usage of the bonsai.cv function, may be depriciated

Usage

1
2
bonsai_cv_models(y, list_functions, h, window = NULL, Start = 1,
  min_lenght = 0, max_fold = NULL)

Arguments

y

Univariate time series

list_functions

a list of functions to test

h

Forecast horizon

window

Length of the rolling window, if NULL, a rolling window will not be used.

Start

how many observations before starting to calculate errors

min_lenght

how many observations are nescessary before starting to calculate errors

max_fold

how many times should the function calculate errors

Details

Let y contain the time series y[1:T]. Then forecastfunction is applied successively to the time series y[1:t], for t=1,…,T-h, making predictions f[t+h]. The errors are given by e[t+h] = y[t+h]-f[t+h]. If h=1, these are returned as a vector, e[1:T]. For h>1, they are returned as a matrix with the hth column containing errors for forecast horizon h. The first few errors may be missing as it may not be possible to apply forecastfunction to very short time series.

Value

Numerical time series object containing the forecast errors as a vector (if h=1) and a matrix otherwise. The time index corresponds to the last period of the training data. The columns correspond to the forecast horizons.

A matrix with the weighted object

Author(s)

Rob Hyndman created the tsCV forecast, heavily based on it


brunocarlin/forecast.bonsai documentation built on May 3, 2019, 5:45 p.m.