Factored OT solvers (low rank, cost or OT plan)
FunctionsSolves factored OT problem and return OT plans and intermediate distribution
This function solve the following OT problem [40]_
\[\mathop{\arg \min}_\mu \quad W_2^2(\mu_a,\mu)+ W_2^2(\mu,\mu_b)\]
where :
\(\mu_a\) and \(\mu_b\) are empirical distributions.
\(\mu\) is an empirical distribution with r samples
And returns the two OT plans between
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))
numItermax (int, optional) – Max number of iterations
stopThr (float, optional) – Stop threshold on the relative variation (>0)
verbose (bool, optional) – Print information along iterations
log (bool, optional) – record log if True
Ga (array-like, shape (ns, r)) – Optimal transportation matrix between source and the intermediate distribution
Gb (array-like, shape (r, nt)) – Optimal transportation matrix between the intermediate and target distribution
X (array-like, shape (r, d)) – Support of the intermediate distribution
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
Solves factored OT problem and return OT plans and intermediate distribution
This function solve the following OT problem [40]_
\[\mathop{\arg \min}_\mu \quad W_2^2(\mu_a,\mu)+ W_2^2(\mu,\mu_b)\]
where :
\(\mu_a\) and \(\mu_b\) are empirical distributions.
\(\mu\) is an empirical distribution with r samples
And returns the two OT plans between
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))
numItermax (int, optional) – Max number of iterations
stopThr (float, optional) – Stop threshold on the relative variation (>0)
verbose (bool, optional) – Print information along iterations
log (bool, optional) – record log if True
Ga (array-like, shape (ns, r)) – Optimal transportation matrix between source and the intermediate distribution
Gb (array-like, shape (r, nt)) – Optimal transportation matrix between the intermediate and target distribution
X (array-like, shape (r, d)) – Support of the intermediate distribution
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4