- DualPotentials.distance(src, tgt)#
Evaluate Wasserstein distance between samples using dual potentials.
This uses direct estimation of potentials against measures when dual functions are provided in usual form. This expression is valid for any cost function.
When potentials are given in correlation form, as specified by the flag
corr, the dual potentials solve the dual problem corresponding to the minimization of the primal OT problem where the ground cost is \(-2\langle x,y\rangle\). To recover the (squared) 2-Wasserstein distance, terms are re-arranged and contributions from squared norms are taken into account.