tk_time_series_cv_plan: Time Series Resample Plan Data Preparation

Description Usage Arguments Details See Also Examples

View source: R/rsample-tk_time_series_cv_plan.R

Description

The tk_time_series_cv_plan() function provides a simple interface to prepare a time series resample specification (rset) of either rolling_origin or time_series_cv class.

Usage

1

Arguments

.data

A time series resample specification of of either rolling_origin or time_series_cv class.

Details

Resample Set

A resample set is an output of the timetk::time_series_cv() function or the rsample::rolling_origin() function.

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(tidyverse)
library(tidyquant)
library(rsample)
library(timetk)

FB_tbl <- FANG %>%
    filter(symbol == "FB") %>%
    select(symbol, date, adjusted)

resample_spec <- time_series_cv(
    FB_tbl,
    initial = 150, assess = 50, skip = 50,
    cumulative = FALSE,
    lag = 30,
    slice_limit = n())

resample_spec %>% tk_time_series_cv_plan()

timetk documentation built on Jan. 19, 2021, 1:06 a.m.