3
$\begingroup$

I have a two-state HMM and I am using Baum-Welch to estimate all the model parameters, including the Transition matrix. Then I use Viterbi to infer the optimal hidden state sequence.

I am using such HMM to infer the hidden states, which are 1 or 0. However, currently the model gives me way more hidden states predicted as 1 than I'd like to have. What I'd like to have then is a good scoring system for the hidden states such that I can rank the states according to their probability of being 1/0 given all the data and parameters.

I am thinking of two different approaches to limit the number of states predicted as 1 for my hidden states:

Q1. Is it possible, and at which stage of my procedure, I should constrain the maximum number of states predicted as 1? Should I assume a certain form of the transition matrix, instead of estimating it, and then fit the other model parameters? I am open to suggestions here.

Q2. I could also use some posterior probability of each state (given all data) to filter some states predicted as 1 out. How should I compute the posterior probability of each state predicted by Viterbi? I.e., I'd like to compute a vector of probabilities of the same length as the viterbi predicted sequence giving the a posteriori probability of each hidden state.

Thanks.

$\endgroup$
3
  • $\begingroup$ Can you please rephrase "however, such approach gives me way too many binding regions (state 0 no binding, and state 1 binding)" into HMM terms, for those of us who don't anything about protein binding regions? Thanks. $\endgroup$
    – jerad
    Commented Dec 4, 2012 at 20:43
  • $\begingroup$ @jerad good point, let me re-write the Q in a more easy-to-follow way... $\endgroup$
    – Dnaiel
    Commented Dec 4, 2012 at 20:44
  • $\begingroup$ @jerad, actually the binding/not binding is irrelevant so I took it away for being useless... $\endgroup$
    – Dnaiel
    Commented Dec 4, 2012 at 20:48

1 Answer 1

1
$\begingroup$

To get a distribution over the hidden state sequence use the forward-backward algorithm rather than viterbi.

Regarding the problem of inferring too many 1s in your hidden sequence, you should think about why your training procedure is not working the way you expect it to. Is your training set too small? Is your training set biased toward some states? Take a look at your learned transition and emission matrices and try to identify wether it is the transition probability or emission probability that is leading to misclassifications? Once you have a better intuition about why your HMM is underperforming then you can try to address it.

One way to address either issue (wether it be with your emission probabilities or transition probabilities) is to use Bayesian HMM with a Dirichlet prior on each of the rows in your transition and emission matrices, and use Gibbs sampling for inference. You could then incorporate your domain knowledge by encoding it in your priors.

$\endgroup$
2
  • $\begingroup$ nice answer. I actually realized that as part of the baum-welch I end up getting the hidden states distribution because I use fwd-bwd each time on the baum-welch algo. With respect to the other comments, nice too, I will think about them and take a deeper look at the results before getting back to you on that one. Again, thanks. $\endgroup$
    – Dnaiel
    Commented Dec 4, 2012 at 21:34
  • $\begingroup$ @Dnaiel, note that Bayesian HMMs are another setting in which hyperpriors on Dirichlet-Multinomials are used. $\endgroup$
    – jerad
    Commented Dec 6, 2012 at 20:45

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.