Learn R Programming

StatRank (version 0.0.6)

Evaluation.Precision.at.k: Calculates the Average Precision at k

Description

Calculates the Average Precision at k

Usage

Evaluation.Precision.at.k(EstimatedRank, RelevanceLevel, k)

Arguments

EstimatedRank
estimated ranking
RelevanceLevel
score for the document
k
positive that we want to run this algorithm for

Value

The AP at k for this estimation and relevance level

Examples

Run this code
EstimatedRank <- scramble(1:10)
RelevanceLevel <- runif(10)
Evaluation.Precision.at.k(EstimatedRank, RelevanceLevel, 5)

Run the code above in your browser using DataLab