Skip to content

Commit 7019709

Browse files
authored
[DOC] Update doc for unbalanced sinkhorn (#700)
* update doc to stte change in default behavior * upadte reelase file
1 parent 05341bb commit 7019709

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

RELEASES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Fixed `ot.mapping` solvers which depended on deprecated `cvxpy` `ECOS` solver (PR #692, Issue #668)
1111
- Fixed numerical errors in `ot.gmm` (PR #690, Issue #689)
1212
- Add version number to the documentation (PR #696)
13+
- Update doc for default regularization in `ot.unbalanced` sinkhorn solvers (Issue #691, PR #700)
1314

1415
## 0.9.5
1516

ot/unbalanced/_sinkhorn.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ def sinkhorn_unbalanced(
5555
- KL is the Kullback-Leibler divergence
5656
5757
The algorithm used for solving the problem is the generalized
58-
Sinkhorn-Knopp matrix scaling algorithm as proposed in :ref:`[10, 25] <references-sinkhorn-unbalanced>`
58+
Sinkhorn-Knopp matrix scaling algorithm as proposed in :ref:`[10, 25]
59+
<references-sinkhorn-unbalanced>`
60+
61+
.. warning::
62+
Starting from version 0.9.5, the default value has been changed to `reg_type='kl'` instead of `reg_type='entropy'`. This makes the function more consistent with the literature
63+
and the other solvers. If you want to use the entropy regularization, please set `reg_type='entropy'` explicitly.
5964
6065
6166
Parameters
@@ -91,7 +96,7 @@ def sinkhorn_unbalanced(
9196
+ Negative entropy: 'entropy':
9297
:math:`\Omega(\gamma) = \sum_{i,j} \gamma_{i,j} \log(\gamma_{i,j}) - \sum_{i,j} \gamma_{i,j}`.
9398
This is equivalent (up to a constant) to :math:`\Omega(\gamma) = \text{KL}(\gamma, 1_{dim_a} 1_{dim_b}^T)`.
94-
+ Kullback-Leibler divergence: 'kl':
99+
+ Kullback-Leibler divergence (default): 'kl':
95100
:math:`\Omega(\gamma) = \text{KL}(\gamma, \mathbf{a} \mathbf{b}^T)`.
96101
c : array-like (dim_a, dim_b), optional (default=None)
97102
Reference measure for the regularization.
@@ -281,8 +286,12 @@ def sinkhorn_unbalanced2(
281286
- KL is the Kullback-Leibler divergence
282287
283288
The algorithm used for solving the problem is the generalized
284-
Sinkhorn-Knopp matrix scaling algorithm as proposed in :ref:`[10, 25] <references-sinkhorn-unbalanced2>`
289+
Sinkhorn-Knopp matrix scaling algorithm as proposed in :ref:`[10, 25]
290+
<references-sinkhorn-unbalanced2>`
285291
292+
.. warning::
293+
Starting from version 0.9.5, the default value has been changed to `reg_type='kl'` instead of `reg_type='entropy'`. This makes the function more consistent with the literature
294+
and the other solvers. If you want to use the entropy regularization, please set `reg_type='entropy'` explicitly.
286295
287296
Parameters
288297
----------
@@ -588,6 +597,10 @@ def sinkhorn_knopp_unbalanced(
588597
589598
The algorithm used for solving the problem is the generalized Sinkhorn-Knopp matrix scaling algorithm as proposed in :ref:`[10, 25] <references-sinkhorn-knopp-unbalanced>`
590599
600+
.. warning::
601+
Starting from version 0.9.5, the default value has been changed to `reg_type='kl'` instead of `reg_type='entropy'`. This makes the function more consistent with the literature
602+
and the other solvers. If you want to use the entropy regularization, please set `reg_type='entropy'` explicitly.
603+
591604
592605
Parameters
593606
----------
@@ -895,6 +908,10 @@ def sinkhorn_stabilized_unbalanced(
895908
log : bool, optional
896909
record `log` if `True`
897910
911+
.. warning::
912+
Starting from version 0.9.5, the default value has been changed to `reg_type='kl'` instead of `reg_type='entropy'`. This makes the function more consistent with the literature
913+
and the other solvers. If you want to use the entropy regularization, please set `reg_type='entropy'` explicitly.
914+
898915
899916
Returns
900917
-------
@@ -1132,7 +1149,6 @@ def sinkhorn_unbalanced_translation_invariant(
11321149
11331150
The algorithm used for solving the problem is the translation invariant Sinkhorn algorithm as proposed in :ref:`[73] <references-sinkhorn-unbalanced-translation-invariant>`
11341151
1135-
11361152
Parameters
11371153
----------
11381154
a : array-like (dim_a,)

0 commit comments

Comments
 (0)