This repository is about Wasserstein Distance or Earth Mover's Distance explanations and its applications.
Wasserstein distance is the distance between two distributions. In computer science, it is called the Earth Mover's Distance(EMD). EMD can be found by solving a transportation problem.
Transportation problem was formalized by French mathematician Gaspard Monge in 1781. In general, it is about moving units of resources/soldiers from source to destination with minimum cost. For example, we have three suppliers
The more mathematical formulation would be using matrices and constraints. Let's say we have a cost matrix
Considering we have a transportation matrix
And accordingly, we have constraints for matrix
The overall cost
The method for solving this problem that I learned during my bachelor in operations research course is called Vogel's method / Vogel's approximation method.
More about vogel's method will be added …
In this application, the images are clustered according to pixels. In [3], the images are clustered by kd-tree. In my example, I used kmeans. I chose 20 as the number of clusters for image one, 10 as the number of clusters for image two. Each
...
A complete implementation will be given in the near future.
[1] https://en.wikipedia.org/wiki/Wasserstein_metric
[2] https://en.wikipedia.org/wiki/Earth_mover%27s_distance
[3] http://www.cs.jhu.edu/~misha/Papers/Rubner98.pdf
[4] https://www.alexirpan.com/2017/02/22/wasserstein-gan.html