hmminit.m

来自「利用HMM的方法的三种语音识别算法」· M 代码 · 共 37 行

M
37
字号
function [hmm] = hmminit (X,hmm,covtype,gamma)% function [hmm] = hmminit (X,hmm,covtype,gamma)%% Initialise  HMM Chain with Gaussian observation models%% X		N x p data matrix% hmm		hmm data structure% covtype       'full' or 'diag' covariance matrices% gamma         weighting of each of N data points %               (default is 1 for each data point)%% e.g.   hmm=struct(K,2,'full');%        hmm=hmmint(X,hmm); [T,ndim]=size(X);if length(X)~=T,  X=X';  [T,ndim]=size(X);end;if nargin < 4 | isempty(gamma), gamma=ones(T,1); endif nargin < 3 | isempty(covtype), covtype='full'; endhmm=hmmhsinit(X,hmm);hmm.obsmodel='Gauss';obsoptions=struct('prrasc',1,'gamma',gamma,'covtype',covtype);hmm=obsinit(X,hmm,obsoptions);% for backward compatibilityfor i=1:hmm.K,  hmm.state(i).Mu=hmm.state(i).Norm_Mu;	  hmm.state(i).Cov=hmm.state(i).Wish_B/(hmm.state(i).Wish_alpha-0.5*(ndim+1));end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?