TALR icon indicating copy to clipboard operation
TALR copied to clipboard

bug in mAP calculation

Open iTomxy opened this issue 4 years ago • 2 comments

I found a bug in your code of calculating mAP, which lies in the function get_AP, originating from the wrong construction of the recall difference list. I advise to change the final computing code of AP to AP = sum(l .* pl) / sum(l);. For reference codes and testing case, see:

iTomxy avatar Sep 04 '20 08:09 iTomxy

Hi, thanks for your attention to this work and to the details. I will check on it this week. Assuming it's indeed a bug, I'm wondering if you have numerical experiments on how much it affects results?

kunhe avatar Sep 07 '20 06:09 kunhe

Not yet, but in the simple case I mentioned, it's a 0.558333 with 0.704167 discrepancy. Although it lies in the range given by the actual lower bound and upper bound, the computed upper bound is wrong.

iTomxy avatar Sep 07 '20 14:09 iTomxy