ott.problems.linear.potentials.EntropicPotentials.distance#

EntropicPotentials.distance(src, tgt)#

Evaluate 2-Wasserstein distance between samples using dual potentials.

Uses Eq. 5 from [Makkuva et al., 2020] when given in corr form, direct estimation by integrating dual function against points when using dual form.

Parameters:
  • src (Array) – Samples from the source distribution, array of shape [n, d].

  • tgt (Array) – Samples from the target distribution, array of shape [m, d].

Return type:

float

Returns:

Wasserstein distance.