dbn_marginal_from_bel.m

来自「贝叶斯网络的matlab实现。可以创建贝叶斯网络、训练模型」· M 代码 · 共 19 行

M
19
字号
function marginal = dbn_marginal_from_bel(engine, i)
% DBN_MARGINAL_FROM_BEL Compute the marginal on a node given the current belief state (bk)
% marginal = dbn_marginal_from_bel(engine, i)
  
if engine.slice1
  j = i;
  c = clq_containing_nodes(engine.sub_engine1, j);
else
  bnet = bnet_from_engine(engine);
  ss = length(bnet.intra);
  j = i+ss;
  c = clq_containing_nodes(engine.sub_engine, j);
end
assert(c >= 1);
bigpot = engine.bel_clpot{c};

pot = marginalize_pot(bigpot, j);
marginal = pot_to_marginal(pot);

⌨️ 快捷键说明

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