ts_splits_plot {healthyR.ts} | R Documentation |
Time Series Splits Plot
Description
Sometimes we want to see the training and testing data in a plot. This is a
simple wrapper around a couple of functions from the timetk
package.
Usage
ts_splits_plot(.splits_obj, .date_col, .value_col)
Arguments
.splits_obj |
The predefined splits object. |
.date_col |
The date column for the time series. |
.value_col |
The value column of the time series. |
Details
You should already have a splits object defined. This function takes in three parameters, the splits object, a date column and the value column.
Value
A time series cv plan plot
Author(s)
Steven P. Sanderson II, MPH
See Also
-
https://business-science.github.io/timetk/reference/plot_time_series_cv_plan.html(tk_time_sers_cv_plan)
-
https://business-science.github.io/timetk/reference/plot_time_series_cv_plan.html(plot_time_series_cv_plan)
Examples
suppressPackageStartupMessages(library(modeltime))
suppressPackageStartupMessages(library(timetk))
suppressPackageStartupMessages(library(dplyr))
data <- ts_to_tbl(AirPassengers) %>%
select(-index)
splits <- time_series_split(
data
, date_col
, assess = 12
, skip = 3
, cumulative = TRUE
)
ts_splits_plot(
.splits_obj = splits,
.date_col = date_col,
.value_col = value
)
[Package healthyR.ts version 0.3.1 Index]