traints: Cross-validated time series train set

Description Usage Arguments Details Value Examples

View source: R/traints.R

Description

Creates a cross-validated train set for a given number of time series iterations.

Usage

1
traints(data, cv_size, lead_time)

Arguments

data

a dataframe with the time series data that the user wants to iterate.

cv_size

Numeric. Cross-validation window that the user want to test the performance of a model.

lead_time

Numeric. How many periods ahead (lead time) the user wants to predict.

Details

This function follows a tidy approach to create train sets applicable to time series data. It admits tsibble, tibble and data frame objects.

Value

a tibble with rows=iterations.

Examples

1
traints(rainfall_cr, cv_size=6, lead_time=3)

opoyc/fcsttools documentation built on Feb. 19, 2020, 12:52 p.m.