Definitioncore
Interpolated precision-recall curve
Also called 11-point interpolated average precision.
Plots, at each recall level r, the highest precision reached at any recall at least r, and averages it over standard recall points.
A ranking gives one pair (recall, precision) at each rank. Plotted in order, the raw points make a sawtooth: precision drops at each nonrelevant document and jumps at each relevant one. The interpolated curve replaces the precision at recall level r by the highest precision at any rank whose recall is at least r. The result never goes up as recall grows, it can be read at fixed recall levels, and it can be averaged over queries level by level.
Definition
Input. A ranking of distinct document ids for one query, with ranks starting at 1, and graded judgments , where a document that is not judged has . A document is relevant when . is the number of relevant documents in the judgments. Let be the number of relevant documents in the first ranks, the precision at rank , and the recall at rank .
Value. For a recall level ,
and when no rank reaches recall . At every rank qualifies, so is the highest precision anywhere in the ranking.
- Gain: binary, with the threshold .
- Discount: none.
- Normalization: none beyond precision itself. Recall is normalized by , the relevant documents in the judgments, not only the retrieved ones.
- Cutoff: the curve is read at chosen recall levels, not at ranks. The standard levels are . The 11-point average is the arithmetic mean of at these 11 levels. It is a single number derived from the curve, and it is not the curve.
- Ties: tied scores change the points and so the curve. This area orders by score descending, then by document id ascending. trec_eval orders tied documents by document number in reverse lexical order.
- No relevant documents (): recall is undefined, so the curve is undefined. Return None and leave the query out of the average.
Averaging over queries. The curve of a query set is the arithmetic mean, at each recall level, of the values of the queries. The 11-point average of the set is the arithmetic mean of the 11 averaged values, which is the same as the mean of the 11-point averages of the queries.
trec_eval. trec_eval (file m_iprec_at_recall.c) does not compare recall with the level directly. It turns each level into a count of relevant documents, , and takes the maximum precision over the ranks with at least relevant documents. A count of 0 gets the maximum precision over the whole run, and a count above the number of relevant documents retrieved gets 0. A comment in that file says that version 9 and earlier added 0.9 and truncated instead. Rounding can lower the count below the exact one, and then trec_eval reports a higher value than the definition above. The example below shows a case.
Properties
Claim 1. is non-increasing on .
Proof. Let . Every rank with also has , so the set for is a subset of the set for . A maximum over a subset is at most the maximum over the whole set. If the set for is empty, the value at is 0, which is at most any precision.
Claim 2. is the smallest function that is non-increasing and lies on or above every raw point, that is, for every rank .
Proof. First, has both properties. It is non-increasing by Claim 1, and rank is in the set for , so .
Next, let have both properties and take any . For each rank with , , the first step because is non-increasing. Taking the maximum over these gives . If there is no such , then .
So interpolation is not a free choice of smoothing: it is the tightest non-increasing upper envelope of the points. One reading is that a user who wants recall at least can always read on to the rank where precision is highest among those that reach it.
Claim 3. The area under the interpolated curve is at least the average precision of the ranking.
Proof. On the page on average precision, AP is shown to be , where is the precision at the smallest rank with recall at least , or 0 if there is none. That rank is in the set of the definition above, so for every . Integrate both sides.
Examples and non-examples
The fixed run on the toy collection
Query q1 "sorted array search" has the relevant documents d1, d2 and d8, so . The fixed run ranks 1, 6, 8, 2, 4 with the tie rule of this area.
| Rank | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Document | d1 | d6 | d8 | d2 | d4 |
| Recall | 1/3 | 1/3 | 2/3 | 1 | 1 |
| Precision | 1 | 1/2 | 2/3 | 3/4 | 3/5 |
The raw precision goes 1, 1/2, 2/3, 3/4, 3/5: down, up, up, down. The interpolated curve is 1 for , because rank 1 qualifies, and for , because the best rank with recall above is rank 4.
| Level | 0 to 0.3 | 0.4 to 1.0 |
|---|---|---|
| 1 | 3/4 |
The 11-point average is . The average precision of the same ranking is . The area under the interpolated curve is , which is at least AP, as Claim 3 says.
The same example in trec_eval
With , the level 0.4 gives , so trec_eval takes the maximum precision over the ranks with at least one relevant document, which is 1 at rank 1. The exact definition needs recall at least 0.4, that is, at least 2 relevant documents, and gives . The other ten levels agree. trec_eval's 11-point average is then , not .
Ties
trec_eval reads the tied scores as the order 6, 1, 8, 4, 2. The precisions are 0, 1/2, 2/3, 1/2, 3/5 with recalls 0, 1/3, 2/3, 2/3, 1. The interpolated curve is for and above, so the levels 0 to 0.6 get and 0.7 to 1.0 get . The 11-point average is .
A run that misses a relevant document
For q2 "posting list merge" the relevant documents are d5, d4 and d3, and a run ranks 8, 5, 1, 4, 2. It finds d5 at rank 2 and d4 at rank 4, with precision at both, and never finds d3. The highest recall is , so the levels 0.7 to 1.0 get 0. The levels 0 to 0.6 get , and the 11-point average is .
The mean curve of q1 and q2 is at the levels 0 to 0.3, at 0.4 to 0.6 and at 0.7 to 1.0. Its 11-point average is , which is also the mean of and .
Non-examples
- The raw points joined by straight lines. This curve is not monotone, and it is not defined at recall 0.
- Straight lines drawn between the points of the relevant ranks. Such a line rises when precision rises, so the curve is not non-increasing, and it is not the envelope of Claim 2.
- The ROC curve of ROC AUC. It plots the true positive rate against the false positive rate, which depends on the number of nonrelevant documents. The precision-recall curve does not use that number.
Related definitions
- Average precision is the area under the uninterpolated step curve. It is the usual single number today, while older TREC reports also gave the 11-point average.
- R-precision is the point where precision and recall are equal, at rank .
- Precision at k reads precision at a rank, while the interpolated curve reads it at a recall level.
Claims 1 to 3 are proved for every ranking. A comparison of two systems by their mean curves at some recall level is a comparison of means over queries, and needs a paired test such as the Wilcoxon signed-rank test or a permutation test before it is called significant.
References
- Christopher D. Manning, Prabhakar Raghavan and Hinrich Schuetze, Introduction to Information Retrieval, Cambridge University Press, 2008, Chapter 8, Section 8.4 (interpolated precision, the sawtooth shape of the raw curve, and the 11-point average)
- Common Evaluation Measures, appendix to the TREC 2006 proceedings, NIST, section on interpolated recall-precision averages (interpolated precision at recall level i is the maximum precision at any recall at least i, which also defines a value at recall 0.0)
- trec_eval, the TREC evaluation program by Chris Buckley, maintained by NIST, file m_iprec_at_recall.c (cutoffs 0.0 to 1.0, each turned into a count of relevant documents with lround(level times num_rel); v9 and earlier added 0.9 and truncated) and file m_11pt_avg.c
- Stefan Buettcher, Charles L. A. Clarke and Gordon V. Cormack, Information Retrieval, Implementing and Evaluating Search Engines, MIT Press, 2010, Chapter 12 (measuring effectiveness, recall-precision curves)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag ZHMAJD Edit this page History Report an error Markdown