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, models = NULL, horizons = NULL,
windows = NULL, facet_plot = c("model", "model_forecast_horizon"),
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.
Required if data_actual
is given. A vector or 1-column data.frame
of numeric row indices or dates (class 'Date') with length nrow(data_actual)
.
The data can be historical and/or holdout/test data, forecasts and actuals are matched by row.names()
.
Optional. Filter results by user-defined model name from train_model()
.
Optional. Filter results by horizon.
Optional. Filter results by validation window number.
Adjust the plot display through ggplot2::facet_grid()
.
facet_plot = NULL
plots results in one facet.
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'.