2
$\begingroup$

I am trying to learn more about the convergence properties of the Baum-Welch algorithm for estimating the HMM parameters. I ran a test comparing the convergence of both the transition and output matrices as a function of the sequence length using MATLAB hmmtrain function.

I have noticed that while the transition matrix tend to converge to the correct transition metrix (using the KL metric) the output matrix do not exhibit the same behavior, namely, the output matrix do not converge to the real parameters.

The following pseudo code describe the skeleton of the experiment:

real_tr = [0.7 0.1 0.1 0.1;
           0.1 0.7 0.1 0.1;
           0.1 0.1 0.7 0.1;
           0.1 0.1 0.1 0.7];

real_out = [0.95 0.05 0.95 0.05
            0.05 0.95 0.05 0.95]';

for seqlength in {30,100,200,...1000}
    seq = hmmgenerate(real_tr, real_out, seqlength, 50)
    est_tr,est_out = hmmtrain(seq)
    dist_tr.append(KL(est_tr,real_tr))
    dist_out.append(KL(est_out,real_out))

plot(dist_tr)
plot(dist_out)

Here you can see the convergence graphs: enter image description here enter image description here

How come the transition matrix estimation tends to converge when the model is trained on a longer sequence but the output matrix do not converge?

$\endgroup$
  • $\begingroup$ does KL mean Kullback-Leibler? Ignoring how it's not technically a metric, you know this gives you "distance" between probability distributions and not between constants, right? $\endgroup$ – Taylor Feb 24 '17 at 14:13
  • $\begingroup$ Yes KL means Kullback-Leiber. I use it to evaluate the difference between the real and estimated transition and output distributions.. $\endgroup$ – Goek Feb 24 '17 at 15:27
  • $\begingroup$ Do you mean transition and output distributions, or do you mean the joint distributions? Otherwise you would have to pick one time point instead of using them all. $\endgroup$ – Taylor Feb 24 '17 at 15:52
  • $\begingroup$ I mean the transition and output distributions. $\endgroup$ – Goek Feb 24 '17 at 16:49
  • 1
    $\begingroup$ The reason of the difference between the convergence of the transition matrix and the output matrix is that to calculate the KL between the the matrices I average the KL distances of each row in the matrix (which represent a distribution) . Since the output distribution has two values but the transition distribution has 4 values, the KL values are substantially larger for the output distributions. $\endgroup$ – Goek Feb 26 '17 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.