From f18ee18a0476bad864e77c9e80e450788b7f1ed0 Mon Sep 17 00:00:00 2001
From: Theophile GENTILHOMME <tgentilhomme@jurasix08.idiap.ch>
Date: Thu, 3 May 2018 08:56:37 +0200
Subject: [PATCH] Small changes

---
 bob/bio/base/script/commands.py    | 12 ++++++------
 bob/bio/base/test/test_commands.py |  2 +-
 doc/experiments.rst                |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bob/bio/base/script/commands.py b/bob/bio/base/script/commands.py
index bf4d0767..5eb7554b 100644
--- a/bob/bio/base/script/commands.py
+++ b/bob/bio/base/script/commands.py
@@ -27,7 +27,7 @@ def rank_option(**kwargs):
 @common_options.table_option()
 @common_options.eval_option()
 @common_options.output_log_metric_option()
-@common_options.criterion_option(['eer', 'hter', 'far', 'mindcf', 'cllr', 'rr'])
+@common_options.criterion_option(['eer', 'min-hter', 'far', 'mindcf', 'cllr', 'rr'])
 @common_options.cost_option()
 @common_options.thresholds_option()
 @common_options.far_option()
@@ -37,7 +37,7 @@ def rank_option(**kwargs):
 @click.pass_context
 def metrics(ctx, scores, evaluation, **kargs):
     """Prints a single output line that contains all info for a given
-    criterion (eer,  hter, far, mindcf, cllr, rr).
+    criterion (eer, min-hter, far, mindcf, cllr, rr).
 
     You need to provide one or more development score file(s) for each experiment.
     You can also provide eval files along with dev files. If only dev-scores
@@ -316,7 +316,7 @@ def hist(ctx, scores, evaluation, **kwargs):
         $ bob bio hist dev-scores1 eval-scores1 dev-scores2
         eval-scores2
 
-        $ bob bio hist --criterion --show-dev hter dev-scores1 eval-scores1
+        $ bob bio hist --criterion --show-dev min-hter dev-scores1 eval-scores1
     """
     process = bio_figure.Hist(ctx, scores, evaluation, load.split)
     process.run()
@@ -383,8 +383,8 @@ def evaluate(ctx, scores, evaluation, **kwargs):
     ctx.invoke(metrics, scores=scores, evaluation=evaluation)
     # other times, appends the content
     ctx.meta['open_mode'] = 'a'
-    click.echo("Computing metrics with HTER%s..." % log_str)
-    ctx.meta['criterion'] = 'hter'  # no criterion passed in evaluate
+    click.echo("Computing metrics with min-HTER%s..." % log_str)
+    ctx.meta['criterion'] = 'min-hter'  # no criterion passed in evaluate
     ctx.invoke(metrics, scores=scores, evaluation=evaluation)
     if 'far_value' in ctx.meta and ctx.meta['far_value'] is not None:
         click.echo("Computing metrics with FAR=%f%s..." %\
@@ -421,7 +421,7 @@ def evaluate(ctx, scores, evaluation, **kwargs):
     # the last one closes the file
     ctx.meta['closef'] = True
     click.echo("Generating score histograms in %s..." % ctx.meta['output'])
-    ctx.meta['criterion'] = 'hter'  # no criterion passed in evaluate
+    ctx.meta['criterion'] = 'eer'  # no criterion passed in evaluate
     ctx.forward(hist)
 
     click.echo("Evaluate successfully completed!")
diff --git a/bob/bio/base/test/test_commands.py b/bob/bio/base/test/test_commands.py
index 33f57c04..d1c6fd8e 100644
--- a/bob/bio/base/test/test_commands.py
+++ b/bob/bio/base/test/test_commands.py
@@ -189,7 +189,7 @@ def test_hist():
         assert result.exit_code == 0, (result.exit_code, result.output)
 
     with runner.isolated_filesystem():
-        result = runner.invoke(commands.hist, ['--criterion', 'hter', '--output',
+        result = runner.invoke(commands.hist, ['--criterion', 'min-hter', '--output',
                                                'HISTO.pdf', '-b',
                                                '30,auto','--no-evaluation', dev1, dev2])
         if result.output:
diff --git a/doc/experiments.rst b/doc/experiments.rst
index 96e8d053..fca7ba7e 100644
--- a/doc/experiments.rst
+++ b/doc/experiments.rst
@@ -170,9 +170,9 @@ min.HTER) on a development set and apply it on an evaluation set, just do:
 
 .. code-block:: sh
 
-    $ bob bio metrics {dev,test}-4col.txt --legends ExpA --criterion hter
+    $ bob bio metrics {dev,test}-4col.txt --legends ExpA --criterion min-hter
 
-    [Min. criterion: HTER ] Threshold on Development set `ExpA`: -4.830500e-03
+    [Min. criterion: MIN-HTER ] Threshold on Development set `ExpA`: -4.830500e-03
     ======  ======================  =================
     ExpA    Development dev-4col    Eval. test-4col
     ======  ======================  =================
-- 
GitLab