-
Notifications
You must be signed in to change notification settings - Fork 851
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels