Skip to content

Commit f827771

Browse files
tlacomberflamary
andauthored
[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 <[email protected]>
1 parent 62e12e4 commit f827771

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ot/bregman.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def sinkhorn2(a, b, M, reg, method='sinkhorn', numItermax=1000,
207207
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target
208208
weights (histograms, both sum to 1)
209209
210+
and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F` (without
211+
the entropic contribution).
212+
210213
.. note:: This function is backend-compatible and will work on arrays
211214
from all compatible backends.
212215
@@ -3059,6 +3062,9 @@ def empirical_sinkhorn2(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean',
30593062
:math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
30603063
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target weights (sum to 1)
30613064
3065+
and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F` (without
3066+
the entropic contribution).
3067+
30623068
30633069
Parameters
30643070
----------
@@ -3237,6 +3243,13 @@ def empirical_sinkhorn_divergence(X_s, X_t, reg, a=None, b=None, metric='sqeucli
32373243
:math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
32383244
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are source and target weights (sum to 1)
32393245
3246+
and returns :math:`\langle \gamma^*, \mathbf{M} \rangle_F -(\langle \gamma^*_a, \mathbf{M_a} \rangle_F + \langle
3247+
\gamma^*_b , \mathbf{M_b} \rangle_F)/2`.
3248+
3249+
.. note: The current implementation does not account for the entropic contributions and thus differs from the
3250+
Sinkhorn divergence as introduced in the literature. The possibility to account for the entropic contributions
3251+
will be provided in a future release.
3252+
32403253
32413254
Parameters
32423255
----------

0 commit comments

Comments
 (0)