3
$\begingroup$

Say I have a hidden Markov model (HMM), and due to the emission distribution and our observations, we get probability 0 for certain states due to computer precision, which causes singularities (divide by 0) when using the forward algorithm.

What are some methods to handle this? One method is to use a distribution with fatter tails, i.e. replace a Gaussian distribution with a t-distribution. Are there others?

$\endgroup$
1
  • 1
    $\begingroup$ It may be helpful to provide some math or code showing where the division by zero occurs? $\endgroup$ Sep 2, 2016 at 5:33

1 Answer 1

1
$\begingroup$

I can think of two ways to avoid numerical underflow:

1) Use the scaling method described in Rabiner's paper (Rabiner, L. R. (1989). A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2), 257-286.)

2) Conduct your computations in log space. (use the logsumexp trick). I don't have a reference right now, but I remember there was a paper on this.

$\endgroup$
1
  • $\begingroup$ Sure it should be a log space. I made the same mistake once, log trick helps. $\endgroup$ Nov 11, 2019 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.