A forecast plot for each horizon for each model in predict.forecast_model()
.
# S3 method for forecast_results
plot(
x,
data_actual = NULL,
actual_indices = NULL,
facet = horizon ~ model,
models = NULL,
horizons = NULL,
windows = NULL,
group_filter = NULL,
...
)
An object of class 'forecast_results' from predict.forecast_model()
.
A data.frame containing the target/outcome name and any grouping columns. The data can be historical actuals and/or holdout/test data.
Required if data_actual
is given. A vector or 1-column data.frame
of numeric row indices or dates (class 'Date' or 'POSIXt') with length nrow(data_actual)
.
The data can be historical actuals and/or holdout/test data.
Optional. For numeric outcomes, a formula with any combination of horizon
, model
, or group
(for grouped time series)
passed to ggplot2::facet_grid()
internally (e.g., horizon ~ model
, horizon + model ~ .
, ~ horizon + group
).
Can be NULL
.
Optional. Filter results by user-defined model name from train_model()
.
Optional. Filter results by horizon.
Optional. Filter results by validation window number.
Optional. A string for filtering plot results for grouped time-series (e.g., "group_col_1 == 'A'"
);
passed to dplyr::filter()
internally.
Not used.
Forecast plot of class 'ggplot'.