Skip to content

Commit

Permalink
Fixed inconsistency in CMC computation, in case positive and negative…
Browse files Browse the repository at this point in the history
… scores are identical
  • Loading branch information
siebenkopf committed Oct 1, 2015
1 parent 3aec10a commit d72d342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bob/measure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def recognition_rate(cmc_scores):
# (usually, there is only one positive score, but just in case...)
max_pos = numpy.max(pos)
# check if the positive score is smaller than all negative scores
if (neg <= max_pos).all():
if (neg < max_pos).all():
correct += 1

# return relative number of
Expand Down Expand Up @@ -122,7 +122,7 @@ def cmc(cmc_scores):
# (usually, there is only one positive score, but just in case...)
max_pos = numpy.max(pos)
# count the number of negative scores that are higher than the best positive score
index = numpy.sum(neg > max_pos)
index = numpy.sum(neg >= max_pos)
match_characteristic[index] += 1

# cumulate
Expand Down

0 comments on commit d72d342

Please sign in to comment.