1

我将重写一个在 Python 中使用 Kevin Murphy 工具箱的 MATLAB 脚本。

我知道在 python 中有一些 HMM 算法实现(Viterbi、Baum Welch、Backword Forward),所以我认为我拥有移植 matlab--> python 所需的一切。

我的 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.

我不明白这个程序实际上做了什么。

抱歉,我刚开始学习机加工

4

1 回答 1

1

我认为评论是解释性的:Find the ML parameters of an HMM with discrete outputs using EM.

您可以阅读这篇经典论文以了解 HMM:隐马尔可夫模型教程和语音识别中的选定应用程序,L. Rabiner,1989,Proc。IEEE 77(2):257--286。

上述函数解决了论文中的问题 3(第 264 页)。

于 2011-12-12T21:16:30.840 回答