Description Usage Arguments Value Examples
View source: R/create_windows.R
Plot validation datasets across time.
1 2 |
x |
An object of class 'windows' from |
lagged_df |
An object of class 'lagged_df' from |
show_labels |
Boolean. If |
group_filter |
Optional. A string for filtering plot results for grouped time series (e.g., |
... |
Not used. |
A plot of the outer-loop nested cross-validation windows of class 'ggplot'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Sampled Seatbelts data from the R package datasets.
data("data_seatbelts", package = "forecastML")
# Example - Training data for 3 horizon-specific models w/ common lags per predictor.
horizons <- c(1, 6, 12)
lookback <- 1:15
data_train <- create_lagged_df(data_seatbelts, type = "train", outcome_col = 1,
lookback = lookback, horizon = horizons)
# All historical window lengths of 12 plus any partial windows at the end of the dataset.
windows <- create_windows(data_train, window_length = 12)
plot(windows, data_train)
# Two custom validation windows with different lengths.
windows <- create_windows(data_train, window_start = c(20, 80), window_stop = c(30, 100))
plot(windows, data_train)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.