Skip to contents

Summarizes a rolling-origin GP backtest with both point and probabilistic forecast metrics.

Usage

forecast_metrics(backtest)

Arguments

backtest

A gaussianprocesses_backtest returned by rolling_origin_gp().

Value

A named list containing RMSE, MAE, standardized RMSE, empirical interval coverage, mean interval width, and mean log predictive density.

Stability

Stable: from version 1.0.0 this interface changes incompatibly only in a major release, after a deprecation period. Results and options that concern an experimental model class, kernel, or argument follow that interface's tier. See gaussianprocesses-package for the policy.

Examples

time <- 0:23
backtest <- rolling_origin_gp(
  time,
  sin(2 * pi * time / 12),
  kernel = time_series_kernel(period = 12),
  initial_window = 12,
  horizon = 3,
  step = 3,
  noise_variance = 0.05
)

forecast_metrics(backtest)
#> $n_forecasts
#> [1] 12
#> 
#> $rmse
#> [1] 0.426043
#> 
#> $mae
#> [1] 0.3607759
#> 
#> $standardized_rmse
#> [1] 0.2913474
#> 
#> $empirical_coverage
#> [1] 1
#> 
#> $interval_level
#> [1] 0.95
#> 
#> $mean_interval_width
#> [1] 5.174559
#> 
#> $mean_log_predictive_density
#> [1] -1.228351
#>