forecastML (version 0.5.0)

plot.windows: Plot validation datasets

Description

Plot validation datasets across time.

Usage

# S3 method for windows
plot(x, lagged_df, show_labels = TRUE,
  group_filter = NULL, ...)

Arguments

x

An object of class 'windows' from create_windows().

lagged_df

An object of class 'lagged_df' from create_lagged_df().

show_labels

Boolean. If TRUE, show validation dataset IDs on the plot.

group_filter

Optional. A string for filtering plot results for grouped time-series (e.g., "group_col_1 == 'A'"). This string is passed to dplyr::filter() internally.

...

Not used.

Value

A plot of the outer-loop nested cross-validation windows of class 'ggplot'.

Examples

Run this code
# NOT RUN {
# 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)

windows <- create_windows(data_train, window_length = 12)

plot(windows, data_train)
# }

Run the code above in your browser using DataCamp Workspace