F1 | R Documentation |
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.
F1(confusion)
confusion |
Confusion matrix as obtained from confusion |
A numeric in [0,1].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.