Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.measure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.measure
Commits
535058d5
Commit
535058d5
authored
Apr 09, 2018
by
Theophile GENTILHOMME
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add excpetion when far criteria is chosen and far value is None
parent
34ae249a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
bob/measure/utils.py
bob/measure/utils.py
+4
-1
No files found.
bob/measure/utils.py
View file @
535058d5
...
...
@@ -56,7 +56,7 @@ def get_fta(scores):
fta_total
+=
total
return
((
neg
,
pos
),
fta_sum
/
fta_total
)
def
get_thres
(
criter
,
neg
,
pos
,
far
=
1e-3
):
def
get_thres
(
criter
,
neg
,
pos
,
far
=
None
):
"""Get threshold for the given positive/negatives scores and criterion
Parameters
...
...
@@ -83,6 +83,9 @@ def get_thres(criter, neg, pos, far=1e-3):
from
.
import
min_hter_threshold
return
min_hter_threshold
(
neg
,
pos
)
elif
criter
==
'far'
:
if
far
is
None
:
raise
click
.
UsageError
(
"FAR value must be provided through "
"``--far-value`` option."
)
from
.
import
far_threshold
return
far_threshold
(
neg
,
pos
,
far
)
...
...
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