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
b81f04aa
Commit
b81f04aa
authored
Apr 18, 2018
by
Theophile GENTILHOMME
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the metric log option, rename eval->evaluation variable
parent
00a68cf5
Pipeline
#19166
failed with stage
in 29 minutes and 19 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
bob/measure/script/commands.py
bob/measure/script/commands.py
+2
-2
bob/measure/script/common_options.py
bob/measure/script/common_options.py
+3
-5
bob/measure/script/figure.py
bob/measure/script/figure.py
+2
-2
No files found.
bob/measure/script/commands.py
View file @
b81f04aa
...
...
@@ -12,7 +12,7 @@ from bob.extension.scripts.click_helper import (verbosity_option,
@
common_options
.
scores_argument
(
nargs
=-
1
)
@
common_options
.
eval_option
()
@
common_options
.
table_option
()
@
common_options
.
output_
plot
_metric_option
()
@
common_options
.
output_
log
_metric_option
()
@
common_options
.
criterion_option
()
@
common_options
.
thresholds_option
()
@
common_options
.
far_option
()
...
...
@@ -193,7 +193,7 @@ def hist(ctx, scores, evaluation, **kwargs):
@
common_options
.
sep_dev_eval_option
()
@
common_options
.
table_option
()
@
common_options
.
eval_option
()
@
common_options
.
output_
plot
_metric_option
()
@
common_options
.
output_
log
_metric_option
()
@
common_options
.
output_plot_file_option
(
default_out
=
'eval_plots.pdf'
)
@
common_options
.
points_curve_option
()
@
common_options
.
n_bins_option
()
...
...
bob/measure/script/common_options.py
View file @
b81f04aa
...
...
@@ -241,12 +241,10 @@ def output_plot_file_option(default_out='plots.pdf', **kwargs):
callback
=
callback
,
**
kwargs
)(
func
)
return
custom_output_plot_file_option
def
output_
plot
_metric_option
(
**
kwargs
):
def
output_
log
_metric_option
(
**
kwargs
):
'''Get options for output file for metrics'''
def
custom_output_
plot
_file_option
(
func
):
def
custom_output_
log
_file_option
(
func
):
def
callback
(
ctx
,
param
,
value
):
''' Save ouput file and associated pdf in context list,
print the path of the file in the log'''
if
value
is
not
None
:
LOGGER
.
debug
(
"Metrics will be output in %s"
,
value
)
ctx
.
meta
[
'log'
]
=
value
...
...
@@ -256,7 +254,7 @@ def output_plot_metric_option(**kwargs):
help
=
'If provided, computed numbers are written to '
'this file instead of the standard output.'
,
callback
=
callback
,
**
kwargs
)(
func
)
return
custom_output_
plot
_file_option
return
custom_output_
log
_file_option
def
criterion_option
(
lcriteria
=
[
'eer'
,
'hter'
,
'far'
],
**
kwargs
):
"""Get option flag to tell which criteriom is used (default:eer)
...
...
bob/measure/script/figure.py
View file @
b81f04aa
...
...
@@ -38,7 +38,7 @@ class MeasureBase(object):
Function that is used to load the input files
"""
__metaclass__
=
ABCMeta
#for python 2.7 compatibility
def
__init__
(
self
,
ctx
,
scores
,
eval
,
func_load
):
def
__init__
(
self
,
ctx
,
scores
,
eval
uation
,
func_load
):
"""
Parameters
----------
...
...
@@ -63,7 +63,7 @@ class MeasureBase(object):
if
self
.
_titles
is
not
None
and
len
(
self
.
_titles
)
!=
self
.
n_sytem
:
raise
click
.
BadParameter
(
"Number of titles must be equal to the "
"number of systems"
)
self
.
_eval
=
eval
self
.
_eval
=
eval
uation
def
run
(
self
):
""" Generate outputs (e.g. metrics, files, pdf plots).
...
...
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