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
53edb31c
Commit
53edb31c
authored
Nov 24, 2015
by
Manuel Günther
Browse files
Added missing test for roc_for_far function
parent
5a7ec24b
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/measure/test_error.py
View file @
53edb31c
...
...
@@ -172,7 +172,7 @@ def test_thresholding():
def
test_plots
():
from
.
import
eer_threshold
,
roc
,
precision_recall_curve
,
det
,
epc
from
.
import
eer_threshold
,
roc
,
roc_for_far
,
precision_recall_curve
,
det
,
epc
# This test set is not separable.
positives
=
bob
.
io
.
base
.
load
(
F
(
'nonsep-positives.hdf5'
))
...
...
@@ -186,6 +186,14 @@ def test_plots():
xyref
=
bob
.
io
.
base
.
load
(
F
(
'nonsep-roc.hdf5'
))
assert
numpy
.
array_equal
(
xy
,
xyref
)
# This example will test the ROC for FAR plot calculation functionality.
far
=
[
0.01
,
0.1
,
1
]
ref
=
[
0.48
,
0.22
,
0
]
xy
=
roc_for_far
(
negatives
,
positives
,
far
)
# uncomment the next line to save a reference value
assert
numpy
.
array_equal
(
xy
[
0
],
far
)
assert
numpy
.
array_equal
(
xy
[
1
],
ref
)
# This example will test the Precision-Recall plot calculation functionality.
xy
=
precision_recall_curve
(
negatives
,
positives
,
100
)
# uncomment the next line to save a reference value
...
...
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