Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mean average precision calculator bug #119

Open
aghodrati opened this issue Jan 8, 2020 · 0 comments
Open

mean average precision calculator bug #119

aghodrati opened this issue Jan 8, 2020 · 0 comments

Comments

@aghodrati
Copy link

there is an example in mean_average_precision_calculator.py

import random
p = np.array([[random.random() for _ in xrange(50)] for _ in xrange(1000)])
a = np.array([[random.choice([0, 1]) for _ in xrange(50)]
     for _ in xrange(1000)])
# mean average precision for 50 classes.
calculator = mean_average_precision_calculator.MeanAveragePrecisionCalculator(
            num_class=50)
calculator.accumulate(p, a)
aps = calculator.peek_map_at_n()

where p and a are numpy array of size n*num_classes.
However, looking at the code, the correct mean average precision should be calculated by calculator.accumulate(p.transpose(), a.transpose()). am I correct?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant