get_metrics.forecast_quantile: Get default metrics for quantile-based forecasts

get_metrics.forecast_quantileR Documentation

Get default metrics for quantile-based forecasts

Description

For quantile-based forecasts, the default scoring rules are:

  • "wis" = wis()

  • "overprediction" = overprediction_quantile()

  • "underprediction" = underprediction_quantile()

  • "dispersion" = dispersion_quantile()

  • "bias" = bias_quantile()

  • "interval_coverage_50" = interval_coverage()

  • "interval_coverage_90" = purrr::partial( interval_coverage, interval_range = 90 )

  • "ae_median" = ae_median_quantile()

Note: The interval_coverage_90 scoring rule is created by modifying interval_coverage(), making use of the function purrr::partial(). 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

## S3 method for class 'forecast_quantile'
get_metrics(x, select = NULL, exclude = NULL, ...)

Arguments

x

A forecast object (a validated data.table with predicted and observed values, see as_forecast_binary()).

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.

...

unused

Input format

metrics-quantile.png

Overview of required input format for quantile-based forecasts

See Also

Other get_metrics functions: get_metrics(), get_metrics.forecast_binary(), get_metrics.forecast_nominal(), get_metrics.forecast_ordinal(), get_metrics.forecast_point(), get_metrics.forecast_sample(), get_metrics.scores()

Examples

get_metrics(example_quantile, select = "wis")

epiforecasts/scoringutils documentation built on Dec. 11, 2024, 11:12 a.m.