metrics_quantile: Default metrics and scoring rules for quantile-based...

View source: R/default-scoring-rules.R

metrics_quantileR Documentation

Default metrics and scoring rules for quantile-based forecasts

Description

Helper function that returns a named list of default scoring rules suitable for forecasts in a quantile-based format.

The default scoring rules are:

  • "wis" = wis

  • "overprediction" = overprediction()

  • "underprediction" = underprediction()

  • "dispersion" = dispersion()

  • "bias" = bias_quantile()

  • "interval_coverage_50" = interval_coverage()

  • "interval_coverage_90" = function(...) { run_safely(..., interval_range = 90, fun = interval_coverage) }

  • "interval_coverage_deviation" = interval_coverage_deviation(),

  • "ae_median" = ae_median_quantile()

Note: The interval_coverage_90 scoring rule is created as a wrapper around interval_coverage(), making use of the function run_safely(). This construct allows the function to deal with arbitrary arguments in ..., while making sure that only those that interval_coverage() can accept get passed on to it. interval_range = 90 is set in the function definition, as passing an argument interval_range = 90 to score() would mean it would also get passed to interval_coverage_50.

Usage

metrics_quantile(select = NULL, exclude = NULL)

Arguments

select

A character vector of scoring rules to select from the list. If select is NULL (the default), all possible scoring rules are returned.

exclude

A character vector of scoring rules to exclude from the list. If select is not NULL, this argument is ignored.

Value

A list of scoring rules.

Examples

metrics_quantile()
metrics_quantile(select = "wis")

epiforecasts/scoringutils documentation built on April 23, 2024, 4:56 p.m.