Study Vault Search notes, aliases and full text
Graph
ConceptDBISAI-written · not yet proofread

Average Precision

Also AP

Average precision (AP) is the average of the values P@R_i over the positions R_1 < … < R_R of all R relevant documents in a result list, where a relevant document missing from the list contributes 0.

Formula#

Equivalently, summing over the ranks kk of the result list:

AP=1R∑k≥1rk relevantP@k.\mathrm{AP} = \frac{1}{R} \sum_{\substack{k \ge 1 \\ r_k \text{ relevant}}} \mathrm{P@}k.

Properties#

  • AP∈[0,1]\mathrm{AP} \in [0, 1].
  • The divisor is always the number RR of relevant documents, not the number of relevant documents found.
  • AP rewards ranking relevant documents high: a relevant document at rank 1 contributes P@1=1\mathrm{P@1} = 1; the ii-th relevant document at rank RiR_i contributes i/Ri≤1i/R_i \le 1.
  • Averaged over all queries of a benchmark it gives MAP.
Proof

Since the ii-th relevant document can be at rank Ri≥iR_i \ge i at the earliest, each term satisfies P@Ri=i/Ri≤1\mathrm{P@}R_i = i/R_i \le 1 (and =0= 0 if missing). So AP=1R∑iP@Ri=1\mathrm{AP} = \frac{1}{R}\sum_i \mathrm{P@}R_i = 1 iff every term equals 1, iff Ri=iR_i = i for i=1,…,Ri = 1, \dots, R, iff the relevant documents occupy ranks 1,…,R1, \dots, R, i.e. all of them come before every non-relevant document. ■\blacksquare

Example#

Sources#

Search

Type In
↑ ↓ move ↵ open ⇥ next section Ctrl↵ results page Prefix # to search text only