@@ -83,7 +83,7 @@ def solve(
8383
8484 Parameters
8585 ----------
86- M : array_like , shape (dim_a, dim_b)
86+ M : array-like , shape (dim_a, dim_b)
8787 Loss matrix
8888 a : array-like, shape (dim_a,), optional
8989 Samples weights in the source domain (default is uniform)
@@ -92,10 +92,10 @@ def solve(
9292 reg : float, optional
9393 Regularization weight :math:`\lambda_r`, by default None (no reg., exact
9494 OT)
95- c : array-like (dim_a, dim_b), optional (default=None)
95+ c : array-like, shape (dim_a, dim_b), optional (default=None)
9696 Reference measure for the regularization.
9797 If None, then use :math:`\mathbf{c} = \mathbf{a} \mathbf{b}^T`.
98- If :math:`\texttt{reg_type}='entropy'` , then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
98+ If :math:`\texttt{reg_type}=` 'entropy', then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
9999 reg_type : str, optional
100100 Type of regularization :math:`R` either "KL", "L2", "entropy",
101101 by default "KL". a tuple of functions can be provided for general
@@ -120,9 +120,9 @@ def solve(
120120 Number of OMP threads for exact OT solver, by default 1
121121 max_iter : int, optional
122122 Maximum number of iterations, by default None (default values in each solvers)
123- plan_init : array_like , shape (dim_a, dim_b), optional
123+ plan_init : array-like , shape (dim_a, dim_b), optional
124124 Initialization of the OT plan for iterative methods, by default None
125- potentials_init : (array_like (dim_a,),array_like (dim_b,)), optional
125+ potentials_init : (array-like (dim_a,),array-like (dim_b,)), optional
126126 Initialization of the OT dual potentials for iterative methods, by default None
127127 tol : _type_, optional
128128 Tolerance for solution precision, by default None (default values in each solvers)
@@ -632,11 +632,11 @@ def solve_gromov(
632632
633633 Parameters
634634 ----------
635- Ca : array_like , shape (dim_a, dim_a)
635+ Ca : array-like , shape (dim_a, dim_a)
636636 Cost matrix in the source domain
637- Cb : array_like , shape (dim_b, dim_b)
637+ Cb : array-like , shape (dim_b, dim_b)
638638 Cost matrix in the target domain
639- M : array_like , shape (dim_a, dim_b), optional
639+ M : array-like , shape (dim_a, dim_b), optional
640640 Linear cost matrix for Fused Gromov-Wasserstein (default is None).
641641 a : array-like, shape (dim_a,), optional
642642 Samples weights in the source domain (default is uniform)
@@ -674,7 +674,7 @@ def solve_gromov(
674674 max_iter : int, optional
675675 Maximum number of iterations, by default None (default values in each
676676 solvers)
677- plan_init : array_like , shape (dim_a, dim_b), optional
677+ plan_init : array-like , shape (dim_a, dim_b), optional
678678 Initialization of the OT plan for iterative methods, by default None
679679 tol : float, optional
680680 Tolerance for solution precision, by default None (default values in
@@ -1399,10 +1399,10 @@ def solve_sample(
13991399 reg : float, optional
14001400 Regularization weight :math:`\lambda_r`, by default None (no reg., exact
14011401 OT)
1402- c : array-like (dim_a, dim_b), optional (default=None)
1402+ c : array-like, shape (dim_a, dim_b), optional (default=None)
14031403 Reference measure for the regularization.
14041404 If None, then use :math:`\mathbf{c} = \mathbf{a} \mathbf{b}^T`.
1405- If :math:`\texttt{reg_type}='entropy'` , then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
1405+ If :math:`\texttt{reg_type}=` 'entropy', then :math:`\mathbf{c} = 1_{dim_a} 1_{dim_b}^T`.
14061406 reg_type : str, optional
14071407 Type of regularization :math:`R` either "KL", "L2", "entropy", by default "KL"
14081408 unbalanced : float or indexable object of length 1 or 2
@@ -1431,13 +1431,13 @@ def solve_sample(
14311431 Number of OMP threads for exact OT solver, by default 1
14321432 max_iter : int, optional
14331433 Maximum number of iteration, by default None (default values in each solvers)
1434- plan_init : array_like , shape (dim_a, dim_b), optional
1434+ plan_init : array-like , shape (dim_a, dim_b), optional
14351435 Initialization of the OT plan for iterative methods, by default None
14361436 rank : int, optional
14371437 Rank of the OT matrix for lazy solers (method='factored'), by default 100
14381438 scaling : float, optional
14391439 Scaling factor for the epsilon scaling lazy solvers (method='geomloss'), by default 0.95
1440- potentials_init : (array_like (dim_a,),array_like (dim_b,)), optional
1440+ potentials_init : (array-like (dim_a,),array-like (dim_b,)), optional
14411441 Initialization of the OT dual potentials for iterative methods, by default None
14421442 tol : _type_, optional
14431443 Tolerance for solution precision, by default None (default values in each solvers)
@@ -1568,7 +1568,7 @@ def solve_sample(
15681568 .. math::
15691569 \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})
15701570
1571- with M_{i,j} = d(x_i,y_j)
1571+ \text{ with} \ M_{i,j} = d(x_i,y_j)
15721572
15731573 can be solved with the following code:
15741574
@@ -1587,7 +1587,7 @@ def solve_sample(
15871587 .. math::
15881588 \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})
15891589
1590- with M_{i,j} = d(x_i,y_j)
1590+ \text{ with} \ M_{i,j} = d(x_i,y_j)
15911591
15921592 can be solved with the following code:
15931593
0 commit comments