# Problem with k-means used to initialize HMM

I have a sequence of two possible observations ($A$, $B$) and want to train an HMM with $h$ states, namely $\lambda_h$, to predict the probability of the next observation using the Baum-Welch algorithm. Output probability distributions are Bernoulli with parameter $p_i$ ($i$ is the state number).

My problem is mainly with the initialization. If $\lambda_h$ is initialized to a totally random HMM, results of learning are poor. On the other hand, the K-Means initialization algorithm assigns zero initial probability ($\pi_i$) to some states if $h > 2$, preventing BW from improvements. I use a 4-state HMM ($\lambda^0_4$) to generate my test sequences. Hence trying $h=4$ should be totally possible!

Any ideas?

Parameters of $\lambda^0_4$:

Transition probabilities: $A_{i,i}$ = 0.4, $A_{i,j\neq i}$=0.2

Observation probability distributions: $p_0$=1.0, $p_1$=0.7, $p_2$=0.3, $p_3$=0.0

Initial state probabilities: $\pi_i$ = 0.25

-

You might want to try the rule of succession. Just add $1/n$ to all your $\pi_i$ (where $n$ is the number of training examples).
Do you mean adding $1/n$ to the $\pi_i$'s resulted from K-Means and then normalizing? It doesn't work, as the contribution is too little (e.g. for $n$=300). – Sadeghd Sep 3 '11 at 16:32