bk_ff_hmm_inf_engine.m

来自「Bayes网络工具箱」· M 代码 · 共 25 行

M
25
字号
function engine = bk_ff_hmm_inf_engine(bnet, onodes)% BK_FF_HMM_INF_ENGINE Naive (HMM-based) implementation of fully factored form of Boyen-Koller % engine = bk_ff_hmm_inf_engine(bnet, onodes)%% This is implemented on top of the forwards-backwards algo for HMMs,% so it is *less* efficient than exact inference! However, it is good for educational purposes,% because it illustrates the BK algorithm very clearly.% The model must obey the same topological restrictions as hmm_inf_engine.[persistent_nodes, transient_nodes] = partition_dbn_nodes(bnet.intra, bnet.inter);assert(isequal(sort(onodes), transient_nodes));[engine.prior, engine.transmat] = dbn_to_hmm(bnet, onodes);ss = length(bnet.intra);engine.onodes = onodes;engine.hnodes = mysetdiff(1:ss, onodes);engine.bel = [];engine.bel_marginals = [];engine.marginals = [];engine = class(engine, 'bk_ff_hmm_inf_engine', inf_engine(bnet));

⌨️ 快捷键说明

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