Learn R Programming

PatientLevelPrediction (version 6.4.1)

averagePrecision: Calculate the average precision

Description

Calculate the average precision

Usage

averagePrecision(prediction)

Value

The average precision value

Arguments

prediction

A prediction object

Details

Calculates the average precision from a predition object

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)
)
averagePrecision(prediction)

Run the code above in your browser using DataLab