Skip to contents

Compute the area under the Precision-Recall curve

Usage

computeAuprc(prediction)

Arguments

prediction

A prediction object as generated using the predict functions.

Value

A numeric value containing the AUPRC

Details

Computes the area under the Precision-Recall curve for the predicted scores, given the true observed outcomes.

Examples

prediction <- data.frame(
  value = c(0.1, 0.2, 0.3, 0.4, 0.5),
  outcomeCount = c(0, 1, 0, 1, 1))
computeAuprc(prediction)
#> [1] 0.904106