new_metric: Create a Metric Function Object

View source: R/metrics.R

new_metricR Documentation

Create a Metric Function Object

Description

Internal helper for constructing metric function objects.

Usage

new_metric(name, fn, task = "both", parameters = list())

Arguments

name

A character string specifying the metric name.

fn

A function that computes the metric from observed and predicted values.

task

A character string specifying the supported task.

parameters

A list of metric-specific parameters.

Value

An object of class "met_metric".


metANN documentation built on May 16, 2026, 1:06 a.m.