tsPartition: Generate training and test indices for time series cross validation
Description
Training and test indices are generated for time series cross validation.
Generated indices are based on the training windowSize, forecast horizons
and whether a rolling or non-rolling cross validation procedure is desired.
Usage
tsPartition(x, rolling, windowSize, maxHorizon)
Value
List containing train and test indices for each fold
Arguments
x
A time series
rolling
Should indices be generated for a rolling or non-rolling procedure?