powered by
Calculate the average precision
averagePrecision(prediction)
The average precision value
A prediction object
Calculates the average precision from a predition object
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