Metrics icon indicating copy to clipboard operation
Metrics copied to clipboard

AP@K Calculate

Open yanyijiang09 opened this issue 2 years ago • 1 comments

https://github.com/benhamner/Metrics/blob/9a637aea795dc6f2333f022b0863398de0a1ca77/Python/ml_metrics/average_precision.py#L32

Hello: I notice that the reuslt from running apk([1, 1, 1], [1, 1, 1], 3) does not return 1. I wonder if it should be if p in actual and p in predicted[:i+1]? Thank you.

yanyijiang09 avatar Sep 15 '22 02:09 yanyijiang09

You are right - it's incorrect. I believe this repo is not maintained for very long, but I would still deprecate it - I spent a few hours on that, and it did not help this error also propagated to a tutorial on the subject.

maayanorner avatar Jun 05 '23 21:06 maayanorner