create_cv_timeslices: Create time-slices for time-series cross-validation

Description Usage Arguments Details Value References

Description

Create time-slices for time-series cross-validation

Usage

1
2
create_cv_timeslices(y, initial_window, horizon = 1, fixed_window = TRUE,
  skip = 0)

Arguments

y

The input time-series

initial_window

initial number of consecutive values in each training set sample

horizon

number of consecutive values in test set sample

fixed_window

To use a fixed window of size initial_window for training every stride. If FALSE, we use the maximum possible length for the training set.

skip

How many slices are to be skipped and not used for cross-validation

Details

It is ensured that initial_windowlength + horizonlength <= length(y).

Value

Time-slices, for use with ts_crossval

References

See https://github.com/topepo/caret/blob/master/pkg/caret/R/createTimeSlices.R


fnoorian/mltsp documentation built on May 16, 2019, 1:48 p.m.