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.pad.base
Commits
6ad86967
Commit
6ad86967
authored
May 29, 2019
by
Amir MOHAMMADI
Browse files
Merge branch 'bpcer_threshold_criteria' into 'master'
Bpcer threshold criteria See merge request
!61
parents
4e89bcb3
a249011c
Pipeline
#30569
canceled with stages
in 1 minute and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/error_utils.py
View file @
6ad86967
...
...
@@ -5,7 +5,7 @@
import
bob.measure
import
numpy
from
bob.measure
import
far_threshold
,
eer_threshold
,
min_hter_threshold
,
farfrr
from
bob.measure
import
far_threshold
,
eer_threshold
,
min_hter_threshold
,
farfrr
,
frr_threshold
from
bob.bio.base.score.load
import
four_column
from
collections
import
defaultdict
import
re
...
...
@@ -17,7 +17,7 @@ def calc_threshold(method, pos, negs, all_negs, far_value=None, is_sorted=False)
Parameters
----------
method : str
One of ``bpcer20``, ``eer``, ``min-hter``.
One of ``bpcer20``, ``eer``, ``min-hter``
, ``apcer20``
.
pos : array_like
The positive scores. They should be sorted!
negs : list
...
...
@@ -45,6 +45,9 @@ def calc_threshold(method, pos, negs, all_negs, far_value=None, is_sorted=False)
if
"bpcer"
in
method
:
desired_apcer
=
1
/
float
(
method
.
replace
(
"bpcer"
,
""
))
threshold
=
apcer_threshold
(
desired_apcer
,
pos
,
*
negs
,
is_sorted
=
is_sorted
)
elif
"apcer"
in
method
:
desired_bpcer
=
1
/
float
(
method
.
replace
(
"apcer"
,
""
))
threshold
=
frr_threshold
(
all_negs
,
pos
,
desired_bpcer
,
True
)
elif
method
==
"far"
:
threshold
=
far_threshold
(
all_negs
,
pos
,
far_value
,
is_sorted
=
is_sorted
)
elif
method
==
"eer"
:
...
...
bob/pad/base/script/pad_commands.py
View file @
6ad86967
...
...
@@ -29,6 +29,18 @@ CRITERIA = (
"bpcer5"
,
"bpcer2"
,
"bpcer1"
,
"apcer5000"
,
"apcer2000"
,
"apcer1000"
,
"apcer500"
,
"apcer200"
,
"apcer100"
,
"apcer50"
,
"apcer20"
,
"apcer10"
,
"apcer5"
,
"apcer2"
,
"apcer1"
,
)
...
...
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