Description Usage Arguments Value Author(s) Examples
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.
1 | tsPartition(x, rolling, windowSize, maxHorizon)
|
x |
A time series |
rolling |
Should indices be generated for a rolling or non-rolling procedure? |
windowSize |
Size of window for training |
maxHorizon |
Maximum forecast horizon |
List containing train and test indices for each fold
Ganesh Krishnan
1 | tsPartition(AirPassengers, rolling = TRUE, windowSize = 10, maxHorizon = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.