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
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?
The text was updated successfully, but these errors were encountered:
there is an example in mean_average_precision_calculator.py
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?
The text was updated successfully, but these errors were encountered: