Description Usage Arguments Value Examples
View source: R/04_comparison_metrics.R
Calculates the
Earth
mover's distance (briefly, the amount of work required to move the data from
one distribution to resemble the other distribution, or the amount of "dirt"
you have to shovel weighted by how far you have to shovel it). Accounts for
both color disparity and size disparity. Recommended unless binAvg
is
off for histogram generation.
1 | EMDistance(T1, T2)
|
T1 |
Dataframe (especially a dataframe as returned by
|
T2 |
Another dataframe like T1. |
Earth mover's distance between the two dataframes (metric of overall bin similarity for a pair of 3-dimensional histograms).
1 2 3 4 5 6 7 | ## Not run:
cluster.list <- colordistance::getHistList(system.file("extdata",
"Heliconius/Heliconius_B", package="colordistance"), lower=rep(0.8, 3),
upper=rep(1, 3))
colordistance:::EMDistance(cluster.list[[1]], cluster.list[[2]])
## End(Not run)
|
Using 3^3 = 27 total bins
|
| | 0%
|
|================== | 25%
|
|=================================== | 50%
|
|==================================================== | 75%
|
|======================================================================| 100%Warning message:
In colordistance::getHistList(system.file("extdata", "Heliconius/Heliconius_B", :
RGB and HSV are device-dependent, perceptually non-uniform color spaces. See 'Color spaces' vignette for more information.
[1] 0.08913133
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.