Skip to main content
2 of 4
added 253 characters in body
mzzx
  • 123
  • 5

Wasserstein distance (support; scipy implementation)

I want to use the Wasserstein distance from scipy.stats.wasserstein_distance to get a measure for the difference between two probability distribution. However, I do not understand how the support matters here.

For example, I would have expected stats.wasserstein_distance([0,1,0],[1,0,0]) to be 1 (as we need to move a mass of weight 1 by a distance of 1), however it is 0. Why is this?

I know this is related to this question: what does the Wasserstein distance between two distributions quantify. My understanding is that the Wasserstein distance is the earth-movers distance; thus, it would be that it is able to show a further distance between delta-function like probability distributions where the peaks are not aligned but further apart - eg, the difference between distributions of two variables with cardinality four [1,0,0,0] and [0,0,1,0] should be higher than between distributions [1,0,0,0] and [0,1,0,0]. The Jensen-Shannon divergence would be the , where the same in both cases. However, in the scipy implementation the Wasserstein distance is zero in both cases also. Is this incorrect or what am I misunderstanding? (I also asked on stackoverflow but realized that maybe crossvalidated is the better community for this question)

mzzx
  • 123
  • 5