What are the weights in the 'emdist' package?

33 Views Asked by At

Below I compute one earth-mover distance and then another one just by dividing the weights:

library(emdist)
set.seed(666)
x <- rnorm(10)
y <- rnorm(12)
# weights:
wx <- rep(1, 10)
wy <- rep(1, 12)

# distances:
emdw(x, wx, y, wy)
# 0.2417742
emdw(x, wx, y, wy/10)
# 0.125035

Why do I get different results? I thought that the weights played a role only through their normalizations (w / sum(w)) but as we can see this is not true. The weights do not define the probability masses of the distributions? I read the doc but this didn't help me.

0

There are 0 best solutions below