Applying precision and recall to ranked retrieval

n Doc# Rel. Recall Precision
1 588 y 0.2 1.00
2 589 y 0.4 1.00
3 576   0.4 0.67
4 590 y 0.6 0.75
5 986   0.6 0.60
6 592 y 0.8 0.67
7 984   0.8 0.57
8 988   0.8 0.50
9 578   0.8 0.44
10 985   0.8 0.40
11 103   0.8 0.36
12 591   0.8 0.33
13 772 y 1.0 0.38
14 990   1.0 0.36

    1. Decide how many objects you want to retrieve (14 in the example)
    2. The number of 'correct' images in that set is the A+C for your recall computation.
    3. Step through the list one by one.
    4. The number of steps is the 'A+B' for your precision computation.
    5. The number of 'correct' images you have seen on each step is the 'A' for both the recall and the precision computation.

Now you should be able to create the PR-graph as above.