Learn R Programming

PatientLevelPrediction (version 6.6.0)

computeAuprc: Compute the area under the Precision-Recall curve

Description

Compute the area under the Precision-Recall curve

Usage

computeAuprc(prediction)

Value

A numeric value containing the AUPRC

Arguments

prediction

A prediction object as generated using the predict functions.

Details

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

Examples

Run this code
prediction <- data.frame(
  value = c(0.1, 0.2, 0.3, 0.4, 0.5),
  outcomeCount = c(0, 1, 0, 1, 1))
computeAuprc(prediction)

Run the code above in your browser using DataLab