get_metrics: Get all metrics of a given type

View source: R/aaa-get_metrics.R

get_metricsR Documentation

Get all metrics of a given type

Description

get_metrics() returns a metric_set() containing all yardstick metrics of the specified type(s).

Usage

get_metrics(type)

Arguments

type

A character vector of metric types. Valid types are: "class", "prob", "ordered_prob", "numeric", "dynamic_survival", "integrated_survival", "static_survival", "linear_pred_survival", and "quantile".

More than 1 type can be selected but you are constrained by which metric types metric_set() allows to be combined. This means that get_metrics(c("class", "prob")) will run without error, but get_metrics(c("class", "numeric")) will return an error because you can't combine "class" and "numeric" metrics.

Value

A metric_set() containing all metrics of the specified type(s).

See Also

metric_set()

Examples

get_metrics("numeric")

get_metrics("class")

# Get multiple types at once
get_metrics(c("class", "prob"))


yardstick documentation built on April 8, 2026, 1:06 a.m.