EMDistance {colordistance}R Documentation

Earth mover's distance between two sets of color clusters

Description

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.

Usage

EMDistance(T1, T2)

Arguments

T1

Dataframe (especially a dataframe as returned by link{extractClusters} or getImageHist, but first three columns must be coordinates).

T2

Another dataframe like T1.

Value

Earth mover's distance between the two dataframes (metric of overall bin similarity for a pair of 3-dimensional histograms).

Examples

## 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)

[Package colordistance version 1.1.2 Index]