# HMM a posteriori probs for hidden states and more

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.

-
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. – jerad Dec 4 '12 at 20:43
@jerad good point, let me re-write the Q in a more easy-to-follow way... – Dnaiel Dec 4 '12 at 20:44
@jerad, actually the binding/not binding is irrelevant so I took it away for being useless... – Dnaiel Dec 4 '12 at 20:48