Commit 83f595ad authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

minor details and changed the legends option to -lg

parent 2bd64323
......@@ -375,7 +375,8 @@ def figsize_option(dflt='4,3', **kwargs):
plt.rcParams['figure.figsize'] = ctx.meta['figsize']
return value
return click.option(
'--figsize', default=dflt, help='If given, will run '
'--figsize', default=dflt, show_default=True,
help='If given, will run '
'``plt.rcParams[\'figure.figsize\']=figsize)``. '
'Example: --fig-size 4,6',
callback=callback, **kwargs)(func)
......@@ -430,7 +431,7 @@ def legends_option(**kwargs):
ctx.meta['legends'] = value
return value
return click.option(
'-Z', '--legends', type=click.STRING, default=None,
'-lg', '--legends', type=click.STRING, default=None,
help='The title for each system comma separated. '
'Example: --legends ISV,CNN',
callback=callback, **kwargs)(func)
......
......@@ -404,11 +404,11 @@ class Roc(PlotBase):
def compute(self, idx, input_scores, input_names):
''' Plot ROC for dev and eval data using
:py:func:`bob.measure.plot.roc`'''
neg_list, pos_list, fta_list = utils.get_fta_list(input_scores)
dev_neg, dev_pos, _ = neg_list[0], pos_list[0], fta_list[0]
neg_list, pos_list, _ = utils.get_fta_list(input_scores)
dev_neg, dev_pos = neg_list[0], pos_list[0]
dev_file = input_names[0]
if self._eval:
eval_neg, eval_pos, _ = neg_list[1], pos_list[1], fta_list[1]
eval_neg, eval_pos = neg_list[1], pos_list[1]
eval_file = input_names[1]
mpl.figure(1)
......@@ -470,11 +470,11 @@ class Det(PlotBase):
def compute(self, idx, input_scores, input_names):
''' Plot DET for dev and eval data using
:py:func:`bob.measure.plot.det`'''
neg_list, pos_list, fta_list = utils.get_fta_list(input_scores)
dev_neg, dev_pos, _ = neg_list[0], pos_list[0], fta_list[0]
neg_list, pos_list, _ = utils.get_fta_list(input_scores)
dev_neg, dev_pos = neg_list[0], pos_list[0]
dev_file = input_names[0]
if self._eval:
eval_neg, eval_pos, _ = neg_list[1], pos_list[1], fta_list[1]
eval_neg, eval_pos = neg_list[1], pos_list[1]
eval_file = input_names[1]
mpl.figure(1)
......@@ -529,11 +529,11 @@ class Epc(PlotBase):
def compute(self, idx, input_scores, input_names):
''' Plot EPC using :py:func:`bob.measure.plot.epc` '''
neg_list, pos_list, fta_list = utils.get_fta_list(input_scores)
dev_neg, dev_pos, _ = neg_list[0], pos_list[0], fta_list[0]
neg_list, pos_list, _ = utils.get_fta_list(input_scores)
dev_neg, dev_pos = neg_list[0], pos_list[0]
dev_file = input_names[0]
if self._eval:
eval_neg, eval_pos, _ = neg_list[1], pos_list[1], fta_list[1]
eval_neg, eval_pos = neg_list[1], pos_list[1]
eval_file = input_names[1]
plot.epc(
......
......@@ -100,11 +100,11 @@ defined in the first equation.
The input to create these two vectors is generated by experiments conducted
by the user and normally sits in files that may need some parsing before
these vectors can be extracted. While it is not possible to provide a parser
these vectors can be extracted. While it is not possible to provide a parser
for every individual file that may be generated in different experimental
frameworks, we do provide a parser for a generic two columns format
where the first column contains -1/1 for negative/positive and the second column
contains score values. Please refer to the documentation of
contains score values. Please refer to the documentation of
:py:func:`bob.measure.load.split` for more details.
In the remainder of this section we assume you have successfully parsed and
......@@ -220,18 +220,18 @@ of the true value being within the interval estimate is equal to :math:`\alpha`.
For example, a 95% confidence interval (i.e. :math:`\alpha = 0.95`) for a
parameter :math:`x` is given by :math:`[L, U]` such that
.. math:: Prob(x∈[L,U]) = 95%
.. math:: Prob(x∈[L,U]) = 95%
The smaller the test size, the wider the confidence
The smaller the test size, the wider the confidence
interval will be, and the greater :math:`\alpha`, the smaller the confidence interval
will be.
`The Clopper-Pearson interval`_, a common method for calculating
confidence intervals, is function of the number of success, the number of trials
confidence intervals, is function of the number of success, the number of trials
and confidence
value :math:`\alpha` is used as :py:func:`bob.measure.utils.confidence_for_indicator_variable`.
It is based on the cumulative probabilities of the binomial distribution. This
method is quite conservative, meaning that the true coverage rate of a 95%
method is quite conservative, meaning that the true coverage rate of a 95%
Clopper–Pearson interval may be well above 95%.
For example, we want to evaluate the reliability of a system to
......@@ -549,7 +549,7 @@ on an evaluation set:
.. note::
Table format can be changed using ``--tablefmt`` option, the default format
being ``rst``. Please refer to ``bob measure metrics --help`` for more details.
Plots
=====
......@@ -573,7 +573,7 @@ For example, to generate a DET curve from development and evaluation datasets:
.. code-block:: sh
$bob measure det --output 'my_det.pdf' dev-1.txt eval-1.txt
$bob measure det -v --output 'my_det.pdf' dev-1.txt eval-1.txt
dev-2.txt eval-2.txt
where `my_det.pdf` will contain DET plots for the two experiments.
......@@ -593,7 +593,7 @@ experiment. For example:
.. code-block:: sh
$bob measure evaluate -l 'my_metrics.txt' -o 'my_plots.pdf' {sys1, sys2}/
$bob measure evaluate -v -l 'my_metrics.txt' -o 'my_plots.pdf' {sys1, sys2}/
{eval,dev}
will output metrics and plots for the two experiments (dev and eval pairs) in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment