bk_ff_hmm_inf_engine.m

来自「基于matlab的bayes net toolbox,希望对大家能有些帮助」· M 代码 · 共 22 行

M
22
字号
function engine = bk_ff_hmm_inf_engine(bnet)% BK_FF_HMM_INF_ENGINE Naive (HMM-based) implementation of fully factored form of Boyen-Koller % engine = bk_ff_hmm_inf_engine(bnet)%% 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.[persistent_nodes, transient_nodes] = partition_dbn_nodes(bnet.intra, bnet.inter);assert(isequal(sort(bnet.observed), transient_nodes));[engine.prior, engine.transmat] = dbn_to_hmm(bnet);ss = length(bnet.intra);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 + -
显示快捷键?