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.