@@ -79,7 +79,7 @@ def solve(
7979
8080 Parameters
8181 ----------
82- M : array_like , shape (dim_a, dim_b)
82+ M : array-like , shape (dim_a, dim_b)
8383 Loss matrix
8484 a : array-like, shape (dim_a,), optional
8585 Samples weights in the source domain (default is uniform)
@@ -88,10 +88,10 @@ def solve(
8888 reg : float, optional
8989 Regularization weight :math:`\lambda_r`, by default None (no reg., exact
9090 OT)
91- c : array-like (dim_a, dim_b), optional (default=None)
91+ c : array-like, shape (dim_a, dim_b), optional (default=None)
9292 Reference measure for the regularization.
9393 If None, then use :math:`\mathbf{c} = \mathbf{a} \mathbf{b}^T`.
94- If :math:`\texttt{reg_type}='entropy'` , then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
94+ If :math:`\texttt{reg_type}=` 'entropy', then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
9595 reg_type : str, optional
9696 Type of regularization :math:`R` either "KL", "L2", "entropy",
9797 by default "KL". a tuple of functions can be provided for general
@@ -116,9 +116,9 @@ def solve(
116116 Number of OMP threads for exact OT solver, by default 1
117117 max_iter : int, optional
118118 Maximum number of iterations, by default None (default values in each solvers)
119- plan_init : array_like , shape (dim_a, dim_b), optional
119+ plan_init : array-like , shape (dim_a, dim_b), optional
120120 Initialization of the OT plan for iterative methods, by default None
121- potentials_init : (array_like (dim_a,),array_like (dim_b,)), optional
121+ potentials_init : (array-like (dim_a,),array-like (dim_b,)), optional
122122 Initialization of the OT dual potentials for iterative methods, by default None
123123 tol : _type_, optional
124124 Tolerance for solution precision, by default None (default values in each solvers)
@@ -628,11 +628,11 @@ def solve_gromov(
628628
629629 Parameters
630630 ----------
631- Ca : array_like , shape (dim_a, dim_a)
631+ Ca : array-like , shape (dim_a, dim_a)
632632 Cost matrix in the source domain
633- Cb : array_like , shape (dim_b, dim_b)
633+ Cb : array-like , shape (dim_b, dim_b)
634634 Cost matrix in the target domain
635- M : array_like , shape (dim_a, dim_b), optional
635+ M : array-like , shape (dim_a, dim_b), optional
636636 Linear cost matrix for Fused Gromov-Wasserstein (default is None).
637637 a : array-like, shape (dim_a,), optional
638638 Samples weights in the source domain (default is uniform)
@@ -669,7 +669,7 @@ def solve_gromov(
669669 max_iter : int, optional
670670 Maximum number of iterations, by default None (default values in each
671671 solvers)
672- plan_init : array_like , shape (dim_a, dim_b), optional
672+ plan_init : array-like , shape (dim_a, dim_b), optional
673673 Initialization of the OT plan for iterative methods, by default None
674674 tol : float, optional
675675 Tolerance for solution precision, by default None (default values in
@@ -1342,10 +1342,10 @@ def solve_sample(
13421342 reg : float, optional
13431343 Regularization weight :math:`\lambda_r`, by default None (no reg., exact
13441344 OT)
1345- c : array-like (dim_a, dim_b), optional (default=None)
1345+ c : array-like, shape (dim_a, dim_b), optional (default=None)
13461346 Reference measure for the regularization.
13471347 If None, then use :math:`\mathbf{c} = \mathbf{a} \mathbf{b}^T`.
1348- If :math:`\texttt{reg_type}='entropy'` , then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
1348+ If :math:`\texttt{reg_type}=` 'entropy', then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
13491349 reg_type : str, optional
13501350 Type of regularization :math:`R` either "KL", "L2", "entropy", by default "KL"
13511351 unbalanced : float or indexable object of length 1 or 2
@@ -1374,13 +1374,13 @@ def solve_sample(
13741374 Number of OMP threads for exact OT solver, by default 1
13751375 max_iter : int, optional
13761376 Maximum number of iteration, by default None (default values in each solvers)
1377- plan_init : array_like , shape (dim_a, dim_b), optional
1377+ plan_init : array-like , shape (dim_a, dim_b), optional
13781378 Initialization of the OT plan for iterative methods, by default None
13791379 rank : int, optional
13801380 Rank of the OT matrix for lazy solers (method='factored'), by default 100
13811381 scaling : float, optional
13821382 Scaling factor for the epsilon scaling lazy solvers (method='geomloss'), by default 0.95
1383- potentials_init : (array_like (dim_a,),array_like (dim_b,)), optional
1383+ potentials_init : (array-like (dim_a,),array-like (dim_b,)), optional
13841384 Initialization of the OT dual potentials for iterative methods, by default None
13851385 tol : _type_, optional
13861386 Tolerance for solution precision, by default None (default values in each solvers)
@@ -1511,7 +1511,7 @@ def solve_sample(
15111511 .. math::
15121512 \min_{\mathbf{T}\geq 0} \quad \sum_{i,j} T_{i,j}M_{i,j} + \lambda_u U(\mathbf{T}\mathbf{1},\mathbf{a}) + \lambda_u U(\mathbf{T}^T\mathbf{1},\mathbf{b})
15131513
1514- with M_{i,j} = d(x_i,y_j)
1514+ \text{ with} \ M_{i,j} = d(x_i,y_j)
15151515
15161516 can be solved with the following code:
15171517
@@ -1530,7 +1530,7 @@ def solve_sample(
15301530 .. math::
15311531 \min_{\mathbf{T}\geq 0} \quad \sum_{i,j} T_{i,j}M_{i,j} + \lambda_r R(\mathbf{T}) + \lambda_u U(\mathbf{T}\mathbf{1},\mathbf{a}) + \lambda_u U(\mathbf{T}^T\mathbf{1},\mathbf{b})
15321532
1533- with M_{i,j} = d(x_i,y_j)
1533+ \text{ with} \ M_{i,j} = d(x_i,y_j)
15341534
15351535 can be solved with the following code:
15361536
0 commit comments