create_ensemble_relative_skill: Ensemble by relative skill

View source: R/create_ensemble_relative_skill.R

create_ensemble_relative_skillR Documentation

Ensemble by relative skill

Description

Ensemble by relative skill

Usage

create_ensemble_relative_skill(
  forecasts,
  evaluation_date,
  continuous_weeks = 4,
  average = "mean",
  skill = "wis",
  history = "All",
  by_horizon = FALSE,
  eval_dir = here::here("evaluation", "weekly-summary"),
  return_criteria = FALSE,
  verbose = FALSE
)

Arguments

forecasts

data.frame containing all the forecasts to be summarised as an ensemble.

evaluation_date

which date should be used to measure model performance? A corresponding file containing evaluations is expected in evaluation/evaluation-{evaluation_date}.csv

continuous_weeks

include only forecasts with a history of evaluation

average

Method to average. One of "mean" or "median"

skill

the relative skill score to be used for creating the ensemble; a column called rel_{skill} is expected to exist in the evaluation csv file

history

the number of recent weeks of history to consider in determining the weights; either "All" or a number of weeks

by_horizon

whether to create the ensemble separately for each horizon (default: FALSE)

eval_dir

character: the path in which to look for evaluation csv files

return_criteria

logical : whether to return a model/inclusion criteria grid as well as the ensemble forecast (default TRUE)

verbose

Logical determining whether diagnostic messages should be printed while running (defaults to FALSE).

Details

Ensemble = sum of forecast values weighted by the inverse of relative skill Weights are by model, horizon, target, location i.e. not weighted by quantile


covid19-forecast-hub-europe/EuroForecastHub documentation built on July 2, 2023, 3:03 p.m.