Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.measure
Commits
60cd1d4c
Commit
60cd1d4c
authored
Apr 25, 2016
by
Manuel Günther
Browse files
Corrected implementation of open set recognition rate tests (which are failing)
Conflicts: bob/measure/test_error.py
parent
5b69b076
Changes
1
Show whitespace changes
Inline
Side-by-side
bob/measure/test_error.py
View file @
60cd1d4c
...
...
@@ -330,26 +330,26 @@ def test_open_set_recognition_rate():
far_value
=
0.01
#No error files
#
No error files
cmc_scores
=
bob
.
measure
.
load
.
cmc_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
normal_scores
=
bob
.
measure
.
load
.
split_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
)
,
1.0
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
,
1.0
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
)
-
1.0
)
<
1e-8
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
-
1.0
)
<
1e-8
t
=
bob
.
measure
.
far_threshold
(
normal_scores
[
0
],
normal_scores
[
1
],
far_value
)
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
,
1.0
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
-
1.0
)
<
1e-8
#One error
#
One error
cmc_scores
=
bob
.
measure
.
load
.
cmc_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
normal_scores
=
bob
.
measure
.
load
.
split_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
)
,
0.857142857143
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
,
0.857142857143
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
)
-
0.857142857143
)
<
1e-8
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
-
0.857142857143
)
<
1e-8
t
=
bob
.
measure
.
far_threshold
(
normal_scores
[
0
],
normal_scores
[
1
],
far_value
)
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
,
0.857142857143
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
-
0.857142857143
)
<
1e-8
#Two errors
#
Two errors
cmc_scores
=
bob
.
measure
.
load
.
cmc_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
normal_scores
=
bob
.
measure
.
load
.
split_four_column
(
F
(
"scores-cmc-4col-open-set.txt"
))
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
)
,
0.857142857143
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
,
0.857142857143
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
)
-
0.857142857143
)
<
1e-8
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
0.5
)
-
0.857142857143
)
<
1e-8
t
=
bob
.
measure
.
far_threshold
(
normal_scores
[
0
],
normal_scores
[
1
],
far_value
)
assert
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
,
0.0
assert
abs
(
bob
.
measure
.
recognition_rate
(
cmc_scores
,
threshold
=
t
)
)
<
1e-8
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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