F1: Calculate F1 score

Description Usage Arguments Value Examples

Description

This function calculates the product of the model's recall and precision. Lower F1 scores may indicate that a model is gaining either precision or recall at the expense of the complementary score.

Usage

1
F1(truth, pred)

Arguments

truth

A logical vector of true values

pred

A logical vector of values predicted by the model

Value

numeric value

Examples

1
2
3
t <- c(TRUE, TRUE, FALSE, TRUE, FALSE)
p <- c(TRUE, FALSE, TRUE, TRUE, FALSE)
F1(t, p)

mdlincoln/modeltests documentation built on May 22, 2019, 4:14 p.m.