jtree_dbn_inf_engine.m

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

M
26
字号
function engine = jtree_dbn_inf_engine(bnet, onodes)% JTREE_DBN_INF_ENGINE Junction tree algo for variable length DBNs% engine = jtree_dbn_inf_engine(bnet, onodes)%% 'onodes' is an optional specification which nodes are observed nodes in slice 1, % which is assumed to be repeated across all slices. It may be used to optimize the jtree.%% This engine is just "syntactic sugar" for the exact version of BK, i.e., it is equivalent to%     engine = bk_inf_engine(bnet, 'exact', onodes)% This may change in the future.%% Note that BK only ever applies jtree to the 2-slice network.  An alternative would be to apply jtree% to the unrolled network.  This is what 'jtree_unrolled_dbn_inf_engine' does.  Unfortunately,% computing the jtree can be slow for long sequences, and this does not support online inference.% Instead we could try to find the repeating pattern in the jtree and unroll the jtree itself whenever% the sequence length changes. (Note: the jtree will only have a repeating pattern if we constrain the% elimination order to respect the temporal order.)  This can be fast, but uses a lot of space,% because we keep all the intermediate cliques which are used to advance the belief state by one time step.%parentpengine = bk_inf_engine(bnet, 'exact', onodes);engine.onodes = onodes;engine = class(engine, 'jtree_dbn_inf_engine', pengine);

⌨️ 快捷键说明

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