min_emd_exhaustive | R Documentation |
Calculates the minimum Earth Mover's Distance (EMD) between two discrete histograms using an exhaustive search.
min_emd_exhaustive(dhist1, dhist2)
dhist1 |
A |
dhist2 |
A |
When "sliding" two piecewise-linear empirical cumulative mass functions (ECMFs) across each other to minimise the EMD between them, it is sufficient to calculate the EMD at all offsets where any knots from the two ECMFs align to ensure that the offset with the global minimum EMD is found.
This is because of the piece-wise linear nature of the two ECMFs. Between any two offsets where knots from the two ECMFs align, EMD will be either constant, or uniformly increasing or decreasing. Therefore, there the EMD between two sets of aligned knots cannot be smaller than the EMD at one or other of the bounding offsets.
Earth Mover's Distance between the two discrete histograms
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.