2011-12-11 69 views
1

我將重寫一個在Python中使用Kevin Murphy的toolbok的MATLAB腳本。我知道在python中有一些HMM算法實現(維特比,Baum Welch,Backword Forward),所以我認爲我擁有了我需要做的一切移植matlab - > python。Kevin Murphy HMM toolbok中的learn_dmm.m中使用的算法是什麼?

我的MATLAB腳本使用寫在learn_dhmm.m的過程:

function [LL, prior, transmat, obsmat, gamma] = learn_dhmm(data, prior, transmat, obsmat, max_iter, thresh, verbose, act, adj_prior, adj_trans, adj_obs, dirichlet) 
% LEARN_HMM Find the ML parameters of an HMM with discrete outputs using EM. 
% 
% [LL, PRIOR, TRANSMAT, OBSMAT] = LEARN_HMM(DATA, PRIOR0, TRANSMAT0, OBSMAT0) 
% computes maximum likelihood estimates of the following parameters, 
% where, for each time t, Q(t) is the hidden state, and 
% Y(t) is the observation 
% prior(i) = Pr(Q(1) = i) 
% transmat(i,j) = Pr(Q(t+1)=j | Q(t)=i) 
% obsmat(i,o) = Pr(Y(t)=o | Q(t)=i) 
% It uses PRIOR0 as the initial estimate of PRIOR, etc. 

我不明白這是什麼程序怎麼做。

,對不起,我只是接近MACHING學習

回答