emd_lp | R Documentation |
Takes two sets of histogram bin masses and bin centres and calculates the Earth Mover's Distance between the two histograms by solving the Transport Problem using linear programming.
emd_lp(bin_masses1, bin_masses2, bin_centres1, bin_centres2)
bin_masses1 |
Bin masses for histogram 1 |
bin_masses2 |
Bin masses for histogram 2 |
bin_centres1 |
Bin centres for histogram 1 |
bin_centres2 |
Bin centres for histogram 2 |
WARNING: Linear Programming solution will only give a correct answer if all masses and distances between bin centres are integers.
Earth Mover's Distance between the two input histograms
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.