f1_aggregate: Aggregate F1

View source: R/metrics.R

f1_aggregateR Documentation

Aggregate F1

Description

Sums the confusion matrices of several batches and computes the F1 once. Batches therefore weigh by their number of positives, not equally, which is how the F1 of a scenario is reported.

Usage

f1_aggregate(TP, FP, FN)

Arguments

TP

True positives, one value per batch.

FP

False positives, one value per batch.

FN

False negatives, one value per batch.

Value

The aggregate F1, or NA when no batch has a positive, real or predicted.

Examples

f1_aggregate(TP = c(8, 6), FP = c(2, 3), FN = c(5, 4))

heimdall documentation built on Dec. 2, 2026, 5:08 p.m.