split_ts: Automatic Time Series Cross-Validation split

Description Usage Arguments Value Examples

View source: R/auxiliar.R

Description

Time series CV split heuristics should keep temporal dependencies, henceforth, the sample should not be "shuffled" into train and test. This function uses a different strategy to define the test and train sets maintain the order of the data.

Usage

1
split_ts(.data, test_size, lag)

Arguments

.data

DataFrame, tibble or tsibble structures.

test_size

Numeric. How many periods will be use to asses the forecast accuracy.

lag

Numeric. How many periods ahead to start the test size.

Value

Nested data-frames or tibbles.

Examples

1
2
3
4
## Not run: 
split_ts()

## End(Not run)

opoyc/autoforecast documentation built on May 18, 2021, 1:29 a.m.