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:
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?