A forecast plot of h-step-ahead forecasts produced from multiple horizon-specific forecast models
using combine_forecasts()
.
# S3 method for forecastML
plot(
x,
data_actual = NULL,
actual_indices = NULL,
facet = ~model,
models = NULL,
group_filter = NULL,
drop_facet = FALSE,
...
)
An object of class 'forecastML' from combine_forecasts()
.
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. A formula with any combination of model
, or group
(for grouped time series)
passed to ggplot2::facet_grid()
internally (e.g., ~ model
, model ~ .
, ~ model + group
).
Optional. Filter results by user-defined model name from train_model()
.
Optional. A string for filtering plot results for grouped time-series (e.g., "group_col_1 == 'A'"
);
passed to dplyr::filter()
internally.
Optional. Boolean. If actuals are given when forecasting factors, the plot facet with 'actual' data can be dropped.
Not used.
Forecast plot of class 'ggplot'.