Entering edit mode
wrighth
▴
260
@wrighth-3452
Last seen 10.2 years ago
I¹m attempting to use the Kldist function to calculate distances
between a
couple of data sets which unfortunately have unequal sample sizes.
Essentially, I¹ve gotten the data sets into two matrices with one
feature
type per column, so m1[,1] is the same data type as m2[,1]. The
documentation for the function indicates that I need to get the
columns into
rows and then coerce them into list form; I¹ve tried:
l1 <- list(t(m1[,1], t(m2[1,]))
KLdist.matrix(l1)
Which gives me back:
[,1] [,2]
[1,] -1.979871e-15 2.529427e-01
[2,] 1.795909e-02 -1.503161e-15
Which seems wrong. Shouldn¹t I be getting back a single KL distance
between
the samples? Am I constructing the list object incorrectly?
Hollis Wright, MS
PhD Candidate, DMICE
Oregon Health and Science University
[[alternative HTML version deleted]]