recall: Recall

Description Usage Arguments See Also Examples

Description

recall computes proportion of observations in the positive class (i.e. the element in actual equals 1) that are predicted to be in the positive class (i.e. the element in predicted equals 1)

Usage

1
recall(actual, predicted)

Arguments

actual

The ground truth binary numeric vector containing 1 for the positive class and 0 for the negative class.

predicted

The predicted binary numeric vector containing 1 for the positive class and 0 for the negative class. Each element represents the prediction for the corresponding element in actual.

See Also

precision fbeta_score

Examples

1
2
3
actual <- c(1, 1, 1, 0, 0, 0)
predicted <- c(1, 0, 1, 1, 1, 1)
recall(actual, predicted)

Example output

[1] 0.6666667

Metrics documentation built on May 1, 2019, 10:11 p.m.

Related to recall in Metrics...