summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo Lacombe <lacombe1993@gmail.com>2022-12-20 16:20:55 +0100
committerGitHub <noreply@github.com>2022-12-20 16:20:55 +0100
commitf8277713d8a63293a4d04082b031d0e467a06d47 (patch)
tree822c4a42a1abe94b9def6c6039bbf6dd987432cb
parent62e12e4e2f260581d84f9614975a3e656f26eb82 (diff)
[MRG] Change Doc empirical_sinkhorn_div to reflect what is computed (#423)
* Changes empirical_sinkhorn_divergence doc to mention that the entroipc term is not taken into account. * change typo regularization->contribution Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
-rw-r--r--ot/bregman.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ot/bregman.py b/ot/bregman.py
index 4e1a25c..89eb295 100644
--- a/ot/bregman.py
+++ b/ot/bregman.py
@@ -207,6 +207,9 @@ def sinkhorn2(a, b, M, reg, method='sinkhorn', numItermax=1000,
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target
weights (histograms, both sum to 1)
+ and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F` (without
+ the entropic contribution).
+
.. note:: This function is backend-compatible and will work on arrays
from all compatible backends.
@@ -3059,6 +3062,9 @@ def empirical_sinkhorn2(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean',
:math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target weights (sum to 1)
+ and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F` (without
+ the entropic contribution).
+
Parameters
----------
@@ -3237,6 +3243,13 @@ def empirical_sinkhorn_divergence(X_s, X_t, reg, a=None, b=None, metric='sqeucli
:math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target weights (sum to 1)
+ and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F -(\langle \gamma^*_a, \mathbf{M_a} \rangle_F + \langle
+ \gamma^*_b , \mathbf{M_b} \rangle_F)/2`.
+
+ .. note: The current implementation does not account for the entropic contributions and thus differs from the
+ Sinkhorn divergence as introduced in the literature. The possibility to account for the entropic contributions
+ will be provided in a future release.
+
Parameters
----------