Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.measure
Commits
d72d342a
Commit
d72d342a
authored
Oct 01, 2015
by
Manuel Günther
Browse files
Fixed inconsistency in CMC computation, in case positive and negative scores are identical
parent
3aec10ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/measure/__init__.py
View file @
d72d342a
...
...
@@ -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
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment