emd_lp: Earth Mover's Distance (EMD) using linear programming (LP)

View source: R/emd.R

emd_lpR Documentation

Earth Mover's Distance (EMD) using linear programming (LP)

Description

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.

Usage

emd_lp(bin_masses1, bin_masses2, bin_centres1, bin_centres2)

Arguments

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

Details

WARNING: Linear Programming solution will only give a correct answer if all masses and distances between bin centres are integers.

Value

Earth Mover's Distance between the two input histograms


alan-turing-institute/network-comparison documentation built on June 7, 2022, 10:41 p.m.