View source: R/rsample-tk_time_series_cv_plan.R
| tk_time_series_cv_plan | R Documentation |
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.
tk_time_series_cv_plan(.data)
.data |
A time series resample specification of of either |
Resample Set
A resample set is an output of the timetk::time_series_cv() function or the
rsample::rolling_origin() function.
A tibble containing the time series crossvalidation plan.
time_series_cv() and rsample::rolling_origin() - Functions used to create
time series resample specfications.
plot_time_series_cv_plan() - The plotting function used for visualizing the
time series resample plan.
library(dplyr)
library(rsample)
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.