Can POT be used to compute Wasserstein-2 distance between 2D distributions? #479
Answered
by
arakotom
FabianoVeglianti
asked this question in
Q&A
|
It seems to me that, at the moment, POT doesn't have an API to compute the Wasserstein-2 distance, but I would like to have a confirmation from you because I could be wrong. Obviously if the answer is :"yes, you can compute it", please tell me also how ^^. |
Answered by
arakotom
May 17, 2023
Replies: 1 comment 1 reply
|
Hi, yes you can compute it. for 2D data, if you have samples then you can use the code in this examples and it also works for higher dimensional data as long as you have samples. |
1 reply
Answer selected by
FabianoVeglianti
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
yes you can compute it. for 2D data, if you have samples then you can use the code in this examples
https://github.com/PythonOT/POT/blob/master/examples/plot_OT_2D_samples.py
and it also works for higher dimensional data as long as you have samples.