Description Usage Arguments Value Examples
Get cross validation folds for time series
1 | cv_ts_folds(x, start_date, horizon, iterations, jump = horizon)
|
x |
(datetime) Vector of dates to create indexes for. Must be ordered. |
start_date |
(date) Date to start creating folds from. |
horizon |
(int) Number of days making up each out-of-sample test set. |
iterations |
(int) Number of training and test sets to create. |
jump |
(int) Number of days to move forward each iteration. Defaults to the horizon length. |
List with train and test elements for each iteration.
1 2 3 | library(lubridate)
dts <- ymd("2019-10-01") + minutes(1)*0:(1441*14-1)
cv_folds <- cv_ts_folds(dts, ymd("2019-10-07"), 2, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.