plot.validation_error: Plot validation dataset forecast error

Description Usage Arguments Value

View source: R/return_error.R

Description

Plot forecast error at various levels of aggregation across validation datasets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'validation_error'
plot(
  x,
  type = c("window", "horizon", "global"),
  metric = NULL,
  facet = NULL,
  models = NULL,
  horizons = NULL,
  windows = NULL,
  group_filter = NULL,
  ...
)

Arguments

x

An object of class 'validation_error' from return_error().

type

Select plot type; type = "window" is the default plot.

metric

Select error metric to plot (e.g., "mae"); attributes(x)$error_metrics[1] is the default metric.

facet

Optional. 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. The default faceting is set internally depending on the plot type.

models

Optional. A vector of user-defined model names from train_model() to filter results.

horizons

Optional. A numeric vector to filter results by horizon.

windows

Optional. A numeric vector to filter results by validation window number.

group_filter

A string for filtering plot results for grouped time series (e.g., "group_col_1 == 'A'").

...

Not used.

Value

Forecast error plots of class 'ggplot'.


nredell/forecastML documentation built on June 14, 2020, 5:12 p.m.