Weak optimal ransport solvers
Solves the weak optimal transport problem between two empirical distributions
where :
\(X^a\) and \(X^b\) are the sample matrices.
\(\mathbf{a}\) and \(\mathbf{b}\) are the sample weights
Note
This function is backend-compatible and will work on arrays from all compatible backends. But the algorithm uses the C++ CPU backend which can lead to copy overhead on GPU arrays.
Uses the conditional gradient algorithm to solve the problem proposed in [39].
Xa ((ns,d) array-like, float) – Source samples
Xb ((nt,d) array-like, float) – Target samples
a ((ns,) array-like, float) – Source histogram (uniform weight if empty list)
b ((nt,) array-like, float) – Target histogram (uniform weight if empty list))
G0 ((ns,nt) array-like, float) – initial guess (default is indep joint density)
numItermax (int, optional) – Max number of iterations
numItermaxEmd (int, optional) – Max number of iterations for emd
stopThr (float, optional) – Stop threshold on the relative variation (>0)
stopThr2 (float, optional) – Stop threshold on the absolute variation (>0)
verbose (bool, optional) – Print information along iterations
log (bool, optional) – record log if True
gamma (array-like, shape (ns, nt)) – Optimal transportation matrix for the given parameters
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
See also
ot.bregman.sinkhornEntropic regularized OT
ot.optim.cgGeneral regularized OT
Solves the weak optimal transport problem between two empirical distributions
where :
\(X^a\) and \(X^b\) are the sample matrices.
\(\mathbf{a}\) and \(\mathbf{b}\) are the sample weights
Note
This function is backend-compatible and will work on arrays from all compatible backends. But the algorithm uses the C++ CPU backend which can lead to copy overhead on GPU arrays.
Uses the conditional gradient algorithm to solve the problem proposed in [39].
Xa ((ns,d) array-like, float) – Source samples
Xb ((nt,d) array-like, float) – Target samples
a ((ns,) array-like, float) – Source histogram (uniform weight if empty list)
b ((nt,) array-like, float) – Target histogram (uniform weight if empty list))
G0 ((ns,nt) array-like, float) – initial guess (default is indep joint density)
numItermax (int, optional) – Max number of iterations
numItermaxEmd (int, optional) – Max number of iterations for emd
stopThr (float, optional) – Stop threshold on the relative variation (>0)
stopThr2 (float, optional) – Stop threshold on the absolute variation (>0)
verbose (bool, optional) – Print information along iterations
log (bool, optional) – record log if True
gamma (array-like, shape (ns, nt)) – Optimal transportation matrix for the given parameters
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
Gozlan, N., Roberto, C., Samson, P. M., & Tetali, P. (2017). Kantorovich duality for general transport costs and applications. Journal of Functional Analysis, 273(11), 3327-3405.
See also
ot.bregman.sinkhornEntropic regularized OT
ot.optim.cgGeneral regularized OT