Use variational posteriors or viterbi algorithm to infer the best latent states of a Markov model (e.g. HMM)?


#1

The deep Markov model tutorial:
https://pyro.ai/examples/dmm.html#

I am thinking how to use the trained deep Markov model to infer the best states for each instance.
I thought two ways, maybe you would have the clue which one is better or more robust.

  • use the transition and emission learned in the model, and the Viterbi algorithm is used to infer the best states.
  • use the variational posteriors directly, i.e. p(z_{t-1} | z_t, x) in the guide.

#2

The Viterbi algorithm (via infer_discrete) will be much faster than using variational posteriors directly.


#3

Hi Fritzo, many thanks for your reply. I will try infer_discrete first. :slight_smile: