metric_f1: F1 Score Metric

View source: R/metrics.R

metric_f1R Documentation

F1 Score Metric

Description

Creates an F1 score metric object for classification tasks.

Usage

metric_f1(positive_class = 1)

Arguments

positive_class

The class label treated as the positive class. Defaults to 1.

Value

An object of class "met_metric".

Examples

metric <- metric_f1()
metric$fn(c(0, 1, 1, 0), c(0, 1, 0, 0))

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