@@ -327,7 +327,8 @@ def gromov_wasserstein(C1, C2, p, q, loss_fun, log=False, armijo=False, **kwargs
327
327
The function solves the following optimization problem:
328
328
329
329
.. math::
330
- \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
330
+ \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \quad \sum_{i,j,k,l}
331
+ L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
331
332
332
333
Where :
333
334
@@ -410,7 +411,8 @@ def gromov_wasserstein2(C1, C2, p, q, loss_fun, log=False, armijo=False, **kwarg
410
411
The function solves the following optimization problem:
411
412
412
413
.. math::
413
- GW = \min_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
414
+ GW = \min_\mathbf{T} \quad \sum_{i,j,k,l}
415
+ L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
414
416
415
417
Where :
416
418
@@ -487,8 +489,8 @@ def fused_gromov_wasserstein(M, C1, C2, p, q, loss_fun='square_loss', alpha=0.5,
487
489
Computes the FGW transport between two graphs (see :ref:`[24] <references-fused-gromov-wasserstein>`)
488
490
489
491
.. math::
490
- \gamma = \mathop{\arg \min}_\gamma (1 - \alpha) <\ gamma, \mathbf{M}>_F + \alpha \sum_{i,j,k,l}
491
- L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
492
+ \gamma = \mathop{\arg \min}_\gamma \quad (1 - \alpha) \langle \ gamma, \mathbf{M} \rangle_F +
493
+ \alpha \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
492
494
493
495
s.t. \ \mathbf{\gamma} \mathbf{1} &= \mathbf{p}
494
496
@@ -569,7 +571,7 @@ def fused_gromov_wasserstein2(M, C1, C2, p, q, loss_fun='square_loss', alpha=0.5
569
571
Computes the FGW distance between two graphs see (see :ref:`[24] <references-fused-gromov-wasserstein2>`)
570
572
571
573
.. math::
572
- \min_\gamma (1 - \alpha) <\ gamma, \mathbf{M}>_F + \alpha \sum_{i,j,k,l}
574
+ \min_\gamma \quad (1 - \alpha) \langle \ gamma, \mathbf{M} \rangle_F + \alpha \sum_{i,j,k,l}
573
575
L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
574
576
575
577
s.t. \ \mathbf{\gamma} \mathbf{1} &= \mathbf{p}
@@ -591,9 +593,9 @@ def fused_gromov_wasserstein2(M, C1, C2, p, q, loss_fun='square_loss', alpha=0.5
591
593
M : array-like, shape (ns, nt)
592
594
Metric cost matrix between features across domains
593
595
C1 : array-like, shape (ns, ns)
594
- Metric cost matrix respresentative of the structure in the source space.
596
+ Metric cost matrix representative of the structure in the source space.
595
597
C2 : array-like, shape (nt, nt)
596
- Metric cost matrix espresentative of the structure in the target space.
598
+ Metric cost matrix representative of the structure in the target space.
597
599
p : array-like, shape (ns,)
598
600
Distribution in the source space.
599
601
q : array-like, shape (nt,)
@@ -612,8 +614,8 @@ def fused_gromov_wasserstein2(M, C1, C2, p, q, loss_fun='square_loss', alpha=0.5
612
614
613
615
Returns
614
616
-------
615
- gamma : array-like, shape (ns, nt)
616
- Optimal transportation matrix for the given parameters.
617
+ fgw-distance : float
618
+ Fused gromov wasserstein distance for the given parameters.
617
619
log : dict
618
620
Log dictionary return only if log==True in parameters.
619
621
@@ -780,7 +782,8 @@ def pointwise_gromov_wasserstein(C1, C2, p, q, loss_fun,
780
782
The function solves the following optimization problem:
781
783
782
784
.. math::
783
- \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
785
+ \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \quad \sum_{i,j,k,l}
786
+ L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
784
787
785
788
s.t. \ \mathbf{T} \mathbf{1} &= \mathbf{p}
786
789
@@ -901,7 +904,8 @@ def sampled_gromov_wasserstein(C1, C2, p, q, loss_fun,
901
904
The function solves the following optimization problem:
902
905
903
906
.. math::
904
- \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
907
+ \mathbf{GW} = \mathop{\arg \min}_\mathbf{T} \quad \sum_{i,j,k,l}
908
+ L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
905
909
906
910
s.t. \ \mathbf{T} \mathbf{1} &= \mathbf{p}
907
911
@@ -1052,7 +1056,7 @@ def entropic_gromov_wasserstein(C1, C2, p, q, loss_fun, epsilon,
1052
1056
The function solves the following optimization problem:
1053
1057
1054
1058
.. math::
1055
- \mathbf{GW} = \mathop{\arg\min}_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l} - \epsilon(H(\mathbf{T}))
1059
+ \mathbf{GW} = \mathop{\arg\min}_\mathbf{T} \quad \ sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l} - \epsilon(H(\mathbf{T}))
1056
1060
1057
1061
s.t. \ \mathbf{T} \mathbf{1} &= \mathbf{p}
1058
1062
@@ -1157,7 +1161,8 @@ def entropic_gromov_wasserstein2(C1, C2, p, q, loss_fun, epsilon,
1157
1161
The function solves the following optimization problem:
1158
1162
1159
1163
.. math::
1160
- GW = \min_\mathbf{T} \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l} - \epsilon(H(\mathbf{T}))
1164
+ GW = \min_\mathbf{T} \quad \sum_{i,j,k,l} L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l})
1165
+ \mathbf{T}_{i,j} \mathbf{T}_{k,l} - \epsilon(H(\mathbf{T}))
1161
1166
1162
1167
Where :
1163
1168
@@ -1223,7 +1228,7 @@ def entropic_gromov_barycenters(N, Cs, ps, p, lambdas, loss_fun, epsilon,
1223
1228
1224
1229
.. math::
1225
1230
1226
- \mathbf{C} = \mathop{\arg \min}_{\mathbf{C}\in \mathbb{R}^{N \times N}} \sum_s \lambda_s \mathrm{GW}(\mathbf{C}, \mathbf{C}_s, \mathbf{p}, \mathbf{p}_s)
1231
+ \mathbf{C} = \mathop{\arg \min}_{\mathbf{C}\in \mathbb{R}^{N \times N}} \quad \ sum_s \lambda_s \mathrm{GW}(\mathbf{C}, \mathbf{C}_s, \mathbf{p}, \mathbf{p}_s)
1227
1232
1228
1233
Where :
1229
1234
@@ -1336,7 +1341,7 @@ def gromov_barycenters(N, Cs, ps, p, lambdas, loss_fun,
1336
1341
1337
1342
.. math::
1338
1343
1339
- \mathbf{C} = \mathop{\arg \min}_{\mathbf{C}\in \mathbb{R}^{N \times N}} \sum_s \lambda_s \mathrm{GW}(\mathbf{C}, \mathbf{C}_s, \mathbf{p}, \mathbf{p}_s)
1344
+ \mathbf{C} = \mathop{\arg \min}_{\mathbf{C}\in \mathbb{R}^{N \times N}} \quad \ sum_s \lambda_s \mathrm{GW}(\mathbf{C}, \mathbf{C}_s, \mathbf{p}, \mathbf{p}_s)
1340
1345
1341
1346
Where :
1342
1347
0 commit comments