powered by
Binary operators in log probability space, to avoid numerical underflow.
elnproduct(elnx, elny) elnsum(elnx, elny) logsumexp(exponents.vec)
Numeric vector with one (logsumexp) or more (others) log probability value(s).
numeric vectors of log probabilities.
Toby Dylan Hocking
http://bozeman.genome.washington.edu/compbio/mbt599_2006/hmm_scaling_revised.pdf
px <- c(0.1, 0.5, 0.9) py <- c(0.001, 0.123, 0.999) lx <- log(px) ly <- log(py) library(plotHMM) elnproduct(lx, ly) elnsum(lx, ly) logsumexp(ly)
Run the code above in your browser using DataLab