The #Wasserstein distance , aka Earth Mover’s Distance (#EMD), provides a robust and insightful approach for comparing #ProbabilityDistributions
. I’ve composed a #Python tutorial
that explains the #OptimalTransport problem required to calculate EMD. It also shows how to solve the OT problem and calculate the EMD using the Python Optimal Transport (POT) library. Feel free to use and share it
https://www.fabriziomusacchio.com/blog/2023-07-23-wasserstein_distance/
Calculating the #Wasserstein distance (#EMD) can be computational costly when using #LinearProgramming. The #Sinkhorn algorithm provides a computationally efficient method for approximating the EMD, making it a practical choice for many applications, especially for large datasets
. Here is another tutorial, showing how to solve #OptimalTransport problem using the Sinkhorn algorithm in #Python
https://www.fabriziomusacchio.com/blog/2023-07-23-wasserstein_distance_sinkhorn/