cpsievert/LDAvis

dist() with jensenShannon returns Nan

lmkirvan opened this issue · 1 comments

I can't quit figure out why (as the jensen Shannon distance function looks okay) but

`jensenShannon <- function(x, y) {
m <- 0.5_(x + y)
0.5_sum(x_log(x/m)) + 0.5_sum(y*log(y/m))
}

dist.mat <- proxy::dist(x = phi, method = jensenShannon)`

returns Nan using phi.

duplicate of #56