How to compute Wasserstein distance?

조회 수: 57 (최근 30일)
Arvind Ganesh
Arvind Ganesh 2019년 5월 23일
편집: Georgios Pyrgiotakis 2020년 5월 14일
I have two probability distributions in arrays P and Q (normalized by area, of same length, and over same sample space). I want to find Wasserstein distance between them.
I tried to use the Earth Mover Distance from here:
My input was [Y, fval] = emd(X, X, P, Q, @gdf)
where X is the sample space. But it is giving output:
No feasible solution found.
Linprog stopped because no point satisfies the constraints.
Is this the way to compute Wasserstein distance? How do I fix this?

답변 (1개)

Koorosh Aslansefat
Koorosh Aslansefat 2020년 4월 29일
편집: Koorosh Aslansefat 2020년 4월 29일
I have recently added new set of functions for ECDF-based distance measure to MATLAB Exchange.
I would suggest to have a look.
  댓글 수: 3
Koorosh Aslansefat
Koorosh Aslansefat 2020년 5월 13일
If P and Q can be considered as empirical distribution function (ECDF), then you can use those functions with a bit of modification.
Georgios Pyrgiotakis
Georgios Pyrgiotakis 2020년 5월 14일
편집: Georgios Pyrgiotakis 2020년 5월 14일
Yes P and Q are emprical CDF. How can I use these functions? I tried but I get lost. It seems that you start with the data set convert it to CDF and then calculate the area between the two curves?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Probability Distributions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by