F1: F1 score

View source: R/metrics.R

F1R Documentation

F1 score

Description

Computes F1 score from a confusion matrix, see confusion. The F1 score is defined as 2 * TP/(2 * TP + FP + FN), where TP are true positives, FP are false positives, and FN are false negatives. If TP + FP + FN = 0, 1 is returned.

Usage

F1(confusion)

Arguments

confusion

Confusion matrix as obtained from confusion

Value

A numeric in [0,1].


causalDisco documentation built on May 12, 2022, 9:05 a.m.

Related to F1 in causalDisco...