Several diagnostic plots can be returned to assess the quality of the forecasts based on predictions on the validation datasets.
# S3 method for training_results
plot(
x,
type = c("prediction", "residual", "forecast_stability"),
facet = horizon ~ model,
models = NULL,
horizons = NULL,
windows = NULL,
valid_indices = NULL,
group_filter = NULL,
keep_missing = FALSE,
...
)An object of class 'training_results' from predict.forecast_model().
Plot type. The default plot is "prediction" for validation dataset predictions.
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).
Optional. Filter results by user-defined model name from train_model().
Optional. A numeric vector of model forecast horizons to filter results by horizon-specific model.
Optional. A numeric vector of window numbers to filter results.
Optional. A numeric or date vector to filter results by validation row indices or dates.
Optional. A string for filtering plot results for grouped time series
(e.g., "group_col_1 == 'A'"). The results are passed to dplyr::filter() internally.
Boolean. If TRUE, predictions are plotted for indices/dates where the outcome is missing.
Not used.
Diagnostic plots of class 'ggplot'.