diff options
author | Théo Lacombe <lacombe1993@gmail.com> | 2020-01-13 17:39:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 17:39:02 +0100 |
commit | 9bbbc84ab7208ccd69934445202538e34439b304 (patch) | |
tree | 887c2040ef396086b383fec962b52a2d0591afbe /src/python/gudhi/wasserstein.py | |
parent | cabafa3852c2d325b83593d34f16dfbc2d9eaefb (diff) |
Update src/python/gudhi/wasserstein.py
Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>
Diffstat (limited to 'src/python/gudhi/wasserstein.py')
-rw-r--r-- | src/python/gudhi/wasserstein.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/python/gudhi/wasserstein.py b/src/python/gudhi/wasserstein.py index b6495c80..3eb7faef 100644 --- a/src/python/gudhi/wasserstein.py +++ b/src/python/gudhi/wasserstein.py @@ -27,7 +27,7 @@ def _build_dist_matrix(X, Y, order=2., internal_p=2.): ''' :param X: (n x 2) numpy.array encoding the (points of the) first diagram. :param Y: (m x 2) numpy.array encoding the second diagram. - :param internal_p: Ground metric (i.e. norm l_q). + :param internal_p: Ground metric (i.e. norm l_p). :param order: exponent for the Wasserstein metric. :returns: (n+1) x (m+1) np.array encoding the cost matrix C. For 1 <= i <= n, 1 <= j <= m, C[i,j] encodes the distance between X[i] and Y[j], while C[i, m+1] (resp. C[n+1, j]) encodes the distance (to the p) between X[i] (resp Y[j]) and its orthogonal proj onto the diagonal. @@ -95,4 +95,3 @@ def wasserstein_distance(X, Y, order=2., internal_p=2.): ot_cost = (n+m) * ot.emd2(a, b, M, numItermax=2000000) return ot_cost ** (1./order) - |