tsPartition {forecastHybrid}R Documentation

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)

Arguments

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

Value

List containing train and test indices for each fold

Author(s)

Ganesh Krishnan

Examples

tsPartition(AirPassengers, rolling = TRUE, windowSize = 10, maxHorizon = 2)


[Package forecastHybrid version 5.0.19 Index]