Skip to content
Snippets Groups Projects
Commit f70730cf authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[doc] Fix documentation errors

parent 4b1d67d6
Branches
No related tags found
1 merge request!105[credible region] Added implementation to return the credible region for the...
Pipeline #55982 passed
This commit is part of merge request !103. Comments created here will be created in the context of that merge request.
...@@ -21,6 +21,8 @@ methods. ...@@ -21,6 +21,8 @@ methods.
For a disambiguation with `Confidence Interval <confidence-interval_>`_ (the For a disambiguation with `Confidence Interval <confidence-interval_>`_ (the
frequentist approach), read `Credible Regions or Intervals frequentist approach), read `Credible Regions or Intervals
<credible-interval_>`_. <credible-interval_>`_.
.. include:: ../links.rst
""" """
import numbers import numbers
...@@ -183,7 +185,7 @@ def comparef1score(tp1, fp1, tn1, fn1, tp2, fp2, tn2, fn2, lambda_, nbsamples): ...@@ -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 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]_. This implementation is based on [GOUTTE-2005]_.
Parameters Parameters
---------- ----------
...@@ -211,7 +213,7 @@ def comparef1score(tp1, fp1, tn1, fn1, tp2, fp2, tn2, fn2, lambda_, nbsamples): ...@@ -211,7 +213,7 @@ def comparef1score(tp1, fp1, tn1, fn1, tp2, fp2, tn2, fn2, lambda_, nbsamples):
Returns Returns
------- -------
f1_score : float f1_score : float
A number between 0.0 and 1.0 that describes the probability that the first system is bigger than the second 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): ...@@ -232,7 +234,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
region of the F1 score. region of the F1 score.
This implementation is based on [GOUTTE-2005]_. This implementation is based on [GOUTTE-2005]_.
Parameters Parameters
---------- ----------
...@@ -266,7 +268,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample): ...@@ -266,7 +268,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
Returns Returns
------- -------
f1_score : (float, float, float, float) f1_score : (float, float, float, float)
F1, mean, mode and credible intervals (95% CI). See `F1-score F1, mean, mode and credible intervals (95% CI). See `F1-score
<https://en.wikipedia.org/wiki/F1_score>`_. It corresponds <https://en.wikipedia.org/wiki/F1_score>`_. It corresponds
...@@ -291,7 +293,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample): ...@@ -291,7 +293,7 @@ def f1score(tp, fp, tn, fn, lambda_, coverage, nbsample):
upper = sortedScores[upperIndex - 1] upper = sortedScores[upperIndex - 1]
return numpy.mean(F1scores), scipy.stats.mode(F1scores)[0][0], lower, upper return numpy.mean(F1scores), scipy.stats.mode(F1scores)[0][0], lower, upper
def measures(tp, fp, tn, fn, lambda_, coverage): def measures(tp, fp, tn, fn, lambda_, coverage):
"""Calculates mean and mode from true/false positive and negative counts """Calculates mean and mode from true/false positive and negative counts
with credible regions with credible regions
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
Credible Interval (or Region) Credible Interval (or Region)
----------------------------- -----------------------------
A `credible interval`_ or region (for multi-dimensional cases) for parameter A `Credible Interval <credible-interval_>`_ or region (for multi-dimensional
:math:`x` consists of a lower estimate :math:`L`, and an upper estimate cases) for parameter :math:`x` consists of a lower estimate :math:`L`, and an
:math:`U`, such that the probability of the true value being within the upper estimate :math:`U`, such that the probability of the true value being
interval estimate is equal to :math:`\alpha`. For example, a 95% credible within the interval estimate is equal to :math:`\alpha`. For example, a 95%
interval (i.e. :math:`\alpha = 0.95`) for a parameter :math:`x` is given by credible interval (i.e. :math:`\alpha = 0.95`) for a parameter :math:`x` is
:math:`[L, U]` such that given by :math:`[L, U]` such that
.. math:: .. math::
P(k \in [L,U]) = 95% P(k \in [L,U]) = 95%
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
.. Place here references to all citations in lower case .. 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 .. _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 .. _credible-interval: https://en.wikipedia.org/wiki/Credible_interval
.. _confidence interval: https://en.wikipedia.org/wiki/Confidence_interval .. _confidence-interval: https://en.wikipedia.org/wiki/Confidence_interval
.. _beta distribution: https://en.wikipedia.org/wiki/Beta_distribution .. _beta distribution: https://en.wikipedia.org/wiki/Beta_distribution
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment