📄 prune_dhmm.m
字号:
function hmm = prune_dhmm(hmm, data, thresh)% PRUNE_DHMM Prune redundant transitions and observations% hmm = prune_dhmm(hmm, data, thresh)%% We use the criterion in Stolcke's thesis p50if nargin < 3, thresh = 1e-2; end[loglik, exp_num_trans, exp_num_visits1, exp_num_emit] = ... compute_ess_dhmm(hmm.startprob, hmm.transmat, hmm.obsmat, data, 0);Q = hmm.nstates;for i=1:Q prune = find(exp_num_trans(i,:) < thresh); hmm.transmat(i,prune) = 0; prune = find(exp_num_emit(i,:) < thresh); hmm.obsmat(i,prune) = 0;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -