select_metrics: Select metrics from a list of functions

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

select_metricsR Documentation

Select metrics from a list of functions

Description

Helper function to return only the scoring rules selected by the user from a list of possible functions.

Usage

select_metrics(metrics, select = NULL, exclude = NULL)

Arguments

metrics

A list of scoring functions.

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

select_metrics(
  metrics = metrics_binary(),
  select = "brier_score"
)
select_metrics(
  metrics = metrics_binary(),
  exclude = "log_score"
)

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