You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a report for a possible bug in computation of AP.
Let say that I have ranks of [0, 3, 4, 5]. If I pass it to compute_ap() with nres = 4, and inspected precision_0 and precision_1 in the function, their values in the for-loop are
However, the values at rank 3 (zero-based) is odd to me, because the precision of ranks at each k is 1.0, 0.5 (2/4), 0.6 (3/5) and 0.667 (4/6). Therefore, the value of precision_0 and precision_1 must be 1.0 and 0.5 respectively at rank 3.
I could be wrong, but it seems to me that there is a bug in conpute_ap().
The text was updated successfully, but these errors were encountered:
tkanmae
changed the title
Possible bug on AP calculation
Possible bug in AP calculation
Mar 3, 2019
I have made a quick draw of this example. I hope you appreciate this old style Precision-Recall (PR) curve drawing:
The colored trapezoid areas are computed at each of the ranks from your example (rank 0,3,4,5), and their sum is the final area under the PR curve or Average Precision (AP) for this query.
Thanks for making your work available.
This is a report for a possible bug in computation of AP.
Let say that I have
ranks
of[0, 3, 4, 5]
. If I pass it tocompute_ap()
withnres = 4
, and inspectedprecision_0
andprecision_1
in the function, their values in the for-loop areHowever, the values at rank 3 (zero-based) is odd to me, because the precision of
ranks
at each k is 1.0, 0.5 (2/4), 0.6 (3/5) and 0.667 (4/6). Therefore, the value ofprecision_0
andprecision_1
must be 1.0 and 0.5 respectively at rank 3.I could be wrong, but it seems to me that there is a bug in
conpute_ap()
.The text was updated successfully, but these errors were encountered: