Skip to content

Commit ac830dd

Browse files
authored
[MRG] Wrong documentation in weak OT solver (#410)
* Docstrings of weak.py updated * releases.md
1 parent fa0d4f2 commit ac830dd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

RELEASES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ roughly 2^31) (PR #381)
2626
- Added a work-around for scipy's bug, where you cannot compute the Hamming distance with a "None" weight attribute. (Issue #400, PR #402)
2727
- Fixed an issue where the doc could not be built due to some changes in matplotlib's API (Issue #403, PR #402)
2828
- Replaced Numpy C Compiler with Setuptools C Compiler due to deprecation issues (Issue #408, PR #409)
29+
- Fixed weak optimal transport docstring (Issue #404, PR #410)
2930

3031

3132
## 0.8.2

ot/weak.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def weak_optimal_transport(Xa, Xb, a=None, b=None, verbose=False, log=False, G0=
1818
1919
2020
.. math::
21-
\gamma = \mathop{\arg \min}_\gamma \quad \|X_a-diag(1/a)\gammaX_b\|_F^2
21+
\gamma = \mathop{\arg \min}_\gamma \quad \sum_i \mathbf{a}_i \left(\mathbf{X^a}_i - \frac{1}{\mathbf{a}_i} \sum_j \gamma_{ij} \mathbf{X^b}_j \right)^2
2222
2323
s.t. \ \gamma \mathbf{1} = \mathbf{a}
2424
@@ -28,7 +28,7 @@ def weak_optimal_transport(Xa, Xb, a=None, b=None, verbose=False, log=False, G0=
2828
2929
where :
3030
31-
- :math:`X_a` :math:`X_b` are the sample matrices.
31+
- :math:`X^a` and :math:`X^b` are the sample matrices.
3232
- :math:`\mathbf{a}` and :math:`\mathbf{b}` are the sample weights
3333
3434
@@ -49,6 +49,8 @@ def weak_optimal_transport(Xa, Xb, a=None, b=None, verbose=False, log=False, G0=
4949
Source histogram (uniform weight if empty list)
5050
b : (nt,) array-like, float
5151
Target histogram (uniform weight if empty list))
52+
G0 : (ns,nt) array-like, float
53+
initial guess (default is indep joint density)
5254
numItermax : int, optional
5355
Max number of iterations
5456
numItermaxEmd : int, optional

0 commit comments

Comments
 (0)