@@ -1317,9 +1317,9 @@ def empirical_sinkhorn(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean', numI
1317
1317
\gamma\geq 0
1318
1318
where :
1319
1319
1320
- - M is the (ns,nt) metric cost matrix
1320
+ - :math:`M` is the (ns,nt) metric cost matrix
1321
1321
- :math:`\Omega` is the entropic regularization term :math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
1322
- - a and b are source and target weights (sum to 1)
1322
+ - :math:`a` and :math:`b` are source and target weights (sum to 1)
1323
1323
1324
1324
1325
1325
Parameters
@@ -1399,7 +1399,7 @@ def empirical_sinkhorn2(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean', num
1399
1399
The function solves the following optimization problem:
1400
1400
1401
1401
.. math::
1402
- W = \min_\gamma_\ gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
1402
+ W = \min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
1403
1403
1404
1404
s.t. \gamma 1 = a
1405
1405
@@ -1408,9 +1408,9 @@ def empirical_sinkhorn2(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean', num
1408
1408
\gamma\geq 0
1409
1409
where :
1410
1410
1411
- - M is the (ns,nt) metric cost matrix
1411
+ - :math:`M` is the (ns,nt) metric cost matrix
1412
1412
- :math:`\Omega` is the entropic regularization term :math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
1413
- - a and b are source and target weights (sum to 1)
1413
+ - :math:`a` and :math:`b` are source and target weights (sum to 1)
1414
1414
1415
1415
1416
1416
Parameters
@@ -1484,13 +1484,20 @@ def empirical_sinkhorn_divergence(X_s, X_t, reg, a=None, b=None, metric='sqeucli
1484
1484
'''
1485
1485
Compute the sinkhorn divergence loss from empirical data
1486
1486
1487
- The function solves the following optimization problem:
1487
+ The function solves the following optimization problems and return the
1488
+ sinkhorn divergence :math:`S`:
1488
1489
1489
1490
.. math::
1490
- S = \min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma) -
1491
- \min_\gamma_a <\gamma_a,M_a>_F + reg\cdot\Omega(\gamma_a) -
1492
- \min_\gamma_b <\gamma_b,M_b>_F + reg\cdot\Omega(\gamma_b)
1493
1491
1492
+ W &= \min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
1493
+
1494
+ W_a &= \min_{\gamma_a} <\gamma_a,M_a>_F + reg\cdot\Omega(\gamma_a)
1495
+
1496
+ W_b &= \min_{\gamma_b} <\gamma_b,M_b>_F + reg\cdot\Omega(\gamma_b)
1497
+
1498
+ S &= W - 1/2 * (W_a + W_b)
1499
+
1500
+ .. math::
1494
1501
s.t. \gamma 1 = a
1495
1502
1496
1503
\gamma^T 1= b
@@ -1510,9 +1517,9 @@ def empirical_sinkhorn_divergence(X_s, X_t, reg, a=None, b=None, metric='sqeucli
1510
1517
\gamma_b\geq 0
1511
1518
where :
1512
1519
1513
- - M (resp. :math:`M_a, M_b) is the (ns,nt) metric cost matrix (resp (ns, ns) and (nt, nt))
1520
+ - :math:`M` (resp. :math:`M_a, M_b` ) is the (ns,nt) metric cost matrix (resp (ns, ns) and (nt, nt))
1514
1521
- :math:`\Omega` is the entropic regularization term :math:`\Omega(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
1515
- - a and b are source and target weights (sum to 1)
1522
+ - :math:`a` and :math:`b` are source and target weights (sum to 1)
1516
1523
1517
1524
1518
1525
Parameters
0 commit comments