From f70730cf210be0098c35e5da3f0dbc39f04b2ec8 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Fri, 5 Nov 2021 04:24:35 +0100
Subject: [PATCH] [doc] Fix documentation errors

---
 bob/measure/credible_region.py | 12 +++++++-----
 doc/ci.rst                     | 12 ++++++------
 doc/links.rst                  |  4 ++--
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/bob/measure/credible_region.py b/bob/measure/credible_region.py
index 76df65f..2172ae3 100644
--- a/bob/measure/credible_region.py
+++ b/bob/measure/credible_region.py
@@ -21,6 +21,8 @@ methods.
    For a disambiguation with `Confidence Interval <confidence-interval_>`_ (the
    frequentist approach), read `Credible Regions or Intervals
    <credible-interval_>`_.
+
+.. include:: ../links.rst
 """
 
 import numbers
@@ -183,7 +185,7 @@ def comparef1score(tp1, fp1, tn1, fn1, tp2, fp2, tn2, fn2, lambda_, nbsamples):
     Returns the probability that the F1-score from 1 system is bigger than the F1-score of a second system
 
     This implementation is based on [GOUTTE-2005]_.
-    
+
 
     Parameters
     ----------
@@ -211,7 +213,7 @@ def comparef1score(tp1, fp1, tn1, fn1, tp2, fp2, tn2, fn2, lambda_, nbsamples):
 
     Returns
     -------
-    
+
     f1_score : float
         A number between 0.0 and 1.0 that describes the probability that the first system is bigger than the second
 
@@ -232,7 +234,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
     region of the F1 score.
 
     This implementation is based on [GOUTTE-2005]_.
-    
+
 
     Parameters
     ----------
@@ -266,7 +268,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
 
     Returns
     -------
-    
+
     f1_score : (float, float, float, float)
         F1, mean, mode and credible intervals (95% CI). See `F1-score
         <https://en.wikipedia.org/wiki/F1_score>`_.  It corresponds
@@ -291,7 +293,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
     upper = sortedScores[upperIndex - 1]
     return numpy.mean(F1scores), scipy.stats.mode(F1scores)[0][0], lower, upper
 
-    
+
 def measures(tp, fp, tn, fn, lambda_, coverage):
     """Calculates mean and mode from true/false positive and negative counts
     with credible regions
diff --git a/doc/ci.rst b/doc/ci.rst
index 51fc7d1..c9a8fe7 100644
--- a/doc/ci.rst
+++ b/doc/ci.rst
@@ -13,12 +13,12 @@
 Credible Interval (or Region)
 -----------------------------
 
-A `credible interval`_ or region (for multi-dimensional cases) for parameter
-:math:`x` consists of a lower estimate :math:`L`, and an upper estimate
-:math:`U`, such that the probability of the true value being within the
-interval estimate is equal to :math:`\alpha`.  For example, a 95% credible
-interval (i.e.  :math:`\alpha = 0.95`) for a parameter :math:`x` is given by
-:math:`[L, U]` such that
+A `Credible Interval <credible-interval_>`_ or region (for multi-dimensional
+cases) for parameter :math:`x` consists of a lower estimate :math:`L`, and an
+upper estimate :math:`U`, such that the probability of the true value being
+within the interval estimate is equal to :math:`\alpha`.  For example, a 95%
+credible interval (i.e.  :math:`\alpha = 0.95`) for a parameter :math:`x` is
+given by :math:`[L, U]` such that
 
 .. math::
    P(k \in [L,U]) = 95%
diff --git a/doc/links.rst b/doc/links.rst
index 64703c9..359e24f 100644
--- a/doc/links.rst
+++ b/doc/links.rst
@@ -9,6 +9,6 @@
 .. Place here references to all citations in lower case
 
 .. _ci-evaluation: https://towardsdatascience.com/five-confidence-intervals-for-proportions-that-you-should-know-about-7ff5484c024f
-.. _credible interval: https://en.wikipedia.org/wiki/Credible_interval
-.. _confidence interval: https://en.wikipedia.org/wiki/Confidence_interval
+.. _credible-interval: https://en.wikipedia.org/wiki/Credible_interval
+.. _confidence-interval: https://en.wikipedia.org/wiki/Confidence_interval
 .. _beta distribution: https://en.wikipedia.org/wiki/Beta_distribution
-- 
GitLab