plot_baselines_samples: Plot cross validated samples of baseline forecasts

Description Usage Arguments Value Examples

View source: R/plot_baselines.R

Description

Plot results of cv_baselines (by ggplot2)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_baselines_samples(
  splits,
  col_date = "index",
  col_value = "value",
  col_group = "type",
  title = NULL,
  colors = NULL,
  date_type = "datetime",
  ncol = 3L,
  scale = NULL
)

Arguments

splits

list of prediction data.frames

col_date

Date column in data.frame, default to "index"

col_value

Value column in data.frame, default to "value"

col_group

Group column in data.frame, default to "type" (e.g. "Actual", "Naive", ...) - see example

title

diagram title

colors

named character vector to fit color to type

date_type

string vector - one of "datetime", "Date" or "character"

ncol

Number of columns

scale

NULL or two Date values to scale x-axis

Value

ggplot2 object

Examples

1
2
3
4
5
6
data <- tsRNN::fc_baseline
plot_baselines_samples(
  splits = list(data, data),
  colors = c("Actual" = "black", "Snaive" = "blue", "Holt" = "green"),
  ncol = 2L
)

thfuchs/tsRNN documentation built on April 17, 2021, 11:03 p.m.