Skip to content

mean average precision calculator bug #119

@aghodrati

Description

@aghodrati

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions