Isn't the Wasserstein distance supposed to be a non-zero number since the probabilities are not equivalent?
In [1]: scipy.stats.wasserstein_distance([0, 1], [1, 0])
Out[1]: 0.0
It is because
scipy.stats.wasserstein_distance
expects 1D distributions in the first and second argument. It doesn't matter in which order you obtained the (same) observations, the distribution is the same. Check that for instance
scipy.stats.wasserstein_distance([3, 1, 2, 4, 5], [1 ,4 ,5 ,3 ,2])
is also
0.0
for the same reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With