hmmlearn - Basic help to understand hmm code in Matlab -
since beginner in matlab , hmm, can not understand kevin murphy's code (http://http://www.cs.ubc.ca/~murphyk/software/hmm/hmm_usage.html) implements hmms mixture of gaussians outputs.
1)
let generate nex=50 vector-valued sequences of length t=50; each vector has size o=2. o = 2; t = 50; nex = 50; data = randn(o,t,nex);
for part of code can not understand o. if understood correctly generates randomly 50 data vectors (nex) of size 50 (t), o = 2, not understand meaning.
2)
[mu0, sigma0] = mixgauss_init(q*m, reshape(data, [o t*nex]), cov_type); mu0 = reshape(mu0, [o q m]); sigma0 = reshape(sigma0, [o o q m]); mixmat0 = mk_stochastic(rand(q,m));
the last line suppose randomly generates covariance matrix first 3 lines can not understand.
3)
[ll, prior1, transmat1, mu1, sigma1, mixmat1] = ... mhmm_em(data, prior0, transmat0, mu0, sigma0, mixmat0, 'max_iter', 2);
there line learning not understand 'max_iter', 2 , ll.
Comments
Post a Comment