Hello,
I would like to compute the Wasserstein distance between two discrete joint probability distributions. The package ExactOptimalTransport.jl does not appear to support 2D distance, but I wonder whether it can be accomplished in the discrete case by properly specifying the cost and distance function. In the 1 dimensional case, we have:
using Distributions
using ExactOptimalTransport
dist1 = Categorical([.2,.3,.1,.4])
dist2 = Categorical([.3,.2,.4,.1])
wd = wasserstein(dist1, dist2)
In the 2D case for a 2X2 joint distribution, we have
joint_dist1 = [.2 .3;.1 .4]
joint_dist2 = [.3 .2;.4 .1]
In my use case, I think Chebyshev distance would work for the cost. In other words, moving mass from one cell two another incurs a cost of 1 in the 2X2 case. Can someone provide some guidance for accomplishing this?
Thank you.