Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.measure
Commits
44f70a83
There was a problem fetching the pipeline summary.
Commit
44f70a83
authored
7 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
more details
parent
83f595ad
Branches
Branches containing commit
Tags
v2.0.14
Tags containing commit
1 merge request
!61
Title and histograms subplots
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/measure/script/commands.py
+15
-16
15 additions, 16 deletions
bob/measure/script/commands.py
bob/measure/script/common_options.py
+5
-8
5 additions, 8 deletions
bob/measure/script/common_options.py
doc/guide.rst
+7
-0
7 additions, 0 deletions
doc/guide.rst
with
27 additions
and
24 deletions
bob/measure/script/commands.py
+
15
−
16
View file @
44f70a83
...
@@ -73,12 +73,12 @@ def roc(ctx, scores, evaluation, **kwargs):
...
@@ -73,12 +73,12 @@ def roc(ctx, scores, evaluation, **kwargs):
only dev scores are provided, you must use flag `--no-evaluation`.
only dev scores are provided, you must use flag `--no-evaluation`.
Examples:
Examples:
$ bob measure roc dev-scores
$ bob measure roc
-v
dev-scores
$ bob measure roc dev-scores1 eval-scores1 dev-scores2
$ bob measure roc
-v
dev-scores1 eval-scores1 dev-scores2
eval-scores2
eval-scores2
$ bob measure roc -o my_roc.pdf dev-scores1 eval-scores1
$ bob measure roc
-v
-o my_roc.pdf dev-scores1 eval-scores1
"""
"""
process
=
figure
.
Roc
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
=
figure
.
Roc
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
.
run
()
process
.
run
()
...
@@ -114,12 +114,12 @@ def det(ctx, scores, evaluation, **kwargs):
...
@@ -114,12 +114,12 @@ def det(ctx, scores, evaluation, **kwargs):
only dev scores are provided, you must use flag `--no-evaluation`.
only dev scores are provided, you must use flag `--no-evaluation`.
Examples:
Examples:
$ bob measure det dev-scores
$ bob measure det
-v
dev-scores
$ bob measure det dev-scores1 eval-scores1 dev-scores2
$ bob measure det
-v
dev-scores1 eval-scores1 dev-scores2
eval-scores2
eval-scores2
$ bob measure det -o my_det.pdf dev-scores1 eval-scores1
$ bob measure det
-v
-o my_det.pdf dev-scores1 eval-scores1
"""
"""
process
=
figure
.
Det
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
=
figure
.
Det
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
.
run
()
process
.
run
()
...
@@ -149,9 +149,9 @@ def epc(ctx, scores, **kwargs):
...
@@ -149,9 +149,9 @@ def epc(ctx, scores, **kwargs):
for each experiment.
for each experiment.
Examples:
Examples:
$ bob measure epc dev-scores eval-scores
$ bob measure epc
-v
dev-scores eval-scores
$ bob measure epc -o my_epc.pdf dev-scores1 eval-scores1
$ bob measure epc
-v
-o my_epc.pdf dev-scores1 eval-scores1
"""
"""
process
=
figure
.
Epc
(
ctx
,
scores
,
True
,
load
.
split
)
process
=
figure
.
Epc
(
ctx
,
scores
,
True
,
load
.
split
)
process
.
run
()
process
.
run
()
...
@@ -189,12 +189,12 @@ def hist(ctx, scores, evaluation, **kwargs):
...
@@ -189,12 +189,12 @@ def hist(ctx, scores, evaluation, **kwargs):
as well, use ``--show-dev`` option.
as well, use ``--show-dev`` option.
Examples:
Examples:
$ bob measure hist dev-scores
$ bob measure hist
-v
dev-scores
$ bob measure hist dev-scores1 eval-scores1 dev-scores2
$ bob measure hist
-v
dev-scores1 eval-scores1 dev-scores2
eval-scores2
eval-scores2
$ bob measure hist --criterion min-hter --show-dev dev-scores1 eval-scores1
$ bob measure hist
-v
--criterion min-hter --show-dev dev-scores1 eval-scores1
"""
"""
process
=
figure
.
Hist
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
=
figure
.
Hist
(
ctx
,
scores
,
evaluation
,
load
.
split
)
process
.
run
()
process
.
run
()
...
@@ -209,7 +209,6 @@ def hist(ctx, scores, evaluation, **kwargs):
...
@@ -209,7 +209,6 @@ def hist(ctx, scores, evaluation, **kwargs):
@common_options.output_log_metric_option
()
@common_options.output_log_metric_option
()
@common_options.output_plot_file_option
(
default_out
=
'
eval_plots.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
eval_plots.pdf
'
)
@common_options.points_curve_option
()
@common_options.points_curve_option
()
@common_options.n_bins_option
()
@common_options.lines_at_option
()
@common_options.lines_at_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
...
@@ -237,14 +236,14 @@ def evaluate(ctx, scores, evaluation, **kwargs):
...
@@ -237,14 +236,14 @@ def evaluate(ctx, scores, evaluation, **kwargs):
* evaluation scores
* evaluation scores
Examples:
Examples:
$ bob measure evaluate dev-scores
$ bob measure evaluate
-v
dev-scores
$ bob measure evaluate scores-dev1 scores-eval1 scores-dev2
$ bob measure evaluate
-v
scores-dev1 scores-eval1 scores-dev2
scores-eval2
scores-eval2
$ bob measure evaluate /path/to/sys-{1,2,3}/scores-{dev,eval}
$ bob measure evaluate
-v
/path/to/sys-{1,2,3}/scores-{dev,eval}
$ bob measure evaluate -l metrics.txt -o my_plots.pdf dev-scores eval-scores
$ bob measure evaluate
-v
-l metrics.txt -o my_plots.pdf dev-scores eval-scores
'''
'''
# first time erase if existing file
# first time erase if existing file
ctx
.
meta
[
'
open_mode
'
]
=
'
w
'
ctx
.
meta
[
'
open_mode
'
]
=
'
w
'
...
...
This diff is collapsed.
Click to expand it.
bob/measure/script/common_options.py
+
5
−
8
View file @
44f70a83
...
@@ -4,6 +4,7 @@ import logging
...
@@ -4,6 +4,7 @@ import logging
import
click
import
click
from
click.types
import
INT
,
FLOAT
from
click.types
import
INT
,
FLOAT
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
tabulate
from
matplotlib.backends.backend_pdf
import
PdfPages
from
matplotlib.backends.backend_pdf
import
PdfPages
from
bob.extension.scripts.click_helper
import
(
bool_option
,
list_float_option
)
from
bob.extension.scripts.click_helper
import
(
bool_option
,
list_float_option
)
...
@@ -245,19 +246,15 @@ def n_bins_option(**kwargs):
...
@@ -245,19 +246,15 @@ def n_bins_option(**kwargs):
def
table_option
(
**
kwargs
):
def
table_option
(
**
kwargs
):
'''
Get table option for tabulate package
'''
Get table option for tabulate package
More informnations: https://pypi.
python.org/pypi
/tabulate
More informnations: https://pypi.
org/project
/tabulate
/
'''
'''
def
custom_table_option
(
func
):
def
custom_table_option
(
func
):
def
callback
(
ctx
,
param
,
value
):
def
callback
(
ctx
,
param
,
value
):
ctx
.
meta
[
'
tablefmt
'
]
=
value
ctx
.
meta
[
'
tablefmt
'
]
=
value
return
value
return
value
return
click
.
option
(
return
click
.
option
(
'
--tablefmt
'
,
type
=
click
.
STRING
,
default
=
'
rst
'
,
'
--tablefmt
'
,
type
=
click
.
Choice
(
tabulate
.
tabulate_formats
),
show_default
=
True
,
help
=
'
Format for table display: `plain`,
'
default
=
'
rst
'
,
show_default
=
True
,
help
=
'
Format of printed tables.
'
,
'
`simple`, `grid`, `fancy_grid`, `pipe`, `orgtbl`,
'
'
`jira`, `presto`, `psql`, `rst`, `mediawiki`, `moinmoin`,
'
'
`youtrack`, `html`, `latex`,
'
'
`latex_raw`, `latex_booktabs`, `textile`
'
,
callback
=
callback
,
**
kwargs
)(
func
)
callback
=
callback
,
**
kwargs
)(
func
)
return
custom_table_option
return
custom_table_option
...
@@ -460,7 +457,7 @@ def x_label_option(dflt=None, **kwargs):
...
@@ -460,7 +457,7 @@ def x_label_option(dflt=None, **kwargs):
return
value
return
value
return
click
.
option
(
return
click
.
option
(
'
-xl
'
,
'
--x-lable
'
,
type
=
click
.
STRING
,
default
=
dflt
,
'
-xl
'
,
'
--x-lable
'
,
type
=
click
.
STRING
,
default
=
dflt
,
help
=
'
Label for x-axis
'
,
show_default
=
True
,
help
=
'
Label for x-axis
'
,
callback
=
callback
,
**
kwargs
)(
func
)
callback
=
callback
,
**
kwargs
)(
func
)
return
custom_x_label_option
return
custom_x_label_option
...
...
This diff is collapsed.
Click to expand it.
doc/guide.rst
+
7
−
0
View file @
44f70a83
...
@@ -470,6 +470,8 @@ look at the implementations at :py:mod:`bob.measure.plot` to understand how to
...
@@ -470,6 +470,8 @@ look at the implementations at :py:mod:`bob.measure.plot` to understand how to
use the |project| methods to compute the curves and interlace that in the way
use the |project| methods to compute the curves and interlace that in the way
that best suits you.
that best suits you.
.. _bob.measure.command_line:
Full applications
Full applications
-----------------
-----------------
...
@@ -583,6 +585,11 @@ where `my_det.pdf` will contain DET plots for the two experiments.
...
@@ -583,6 +585,11 @@ where `my_det.pdf` will contain DET plots for the two experiments.
different plots. You can force gather everything in the same plot using
different plots. You can force gather everything in the same plot using
``--no-split`` option.
``--no-split`` option.
.. note::
The ``--figsize`` and ``--style`` options are two powerful options that can
dramatically change the appearance of your figures. Try them! (e.g.
``--figsize 12,10 --style grayscale``)
Evaluate
Evaluate
========
========
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment