From f8277713d8a63293a4d04082b031d0e467a06d47 Mon Sep 17 00:00:00 2001 From: Théo Lacombe Date: Tue, 20 Dec 2022 16:20:55 +0100 Subject: [MRG] Change Doc empirical_sinkhorn_div to reflect what is computed (#423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- ot/bregman.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ot') 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 ---------- -- cgit v1.2.3