comparison toolboxes/FullBNT-1.0.7/bnt/inference/dynamic/@bk_inf_engine/dbn_marginal_from_bel.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function marginal = dbn_marginal_from_bel(engine, i)
2 % DBN_MARGINAL_FROM_BEL Compute the marginal on a node given the current belief state (bk)
3 % marginal = dbn_marginal_from_bel(engine, i)
4
5 if engine.slice1
6 j = i;
7 c = clq_containing_nodes(engine.sub_engine1, j);
8 else
9 bnet = bnet_from_engine(engine);
10 ss = length(bnet.intra);
11 j = i+ss;
12 c = clq_containing_nodes(engine.sub_engine, j);
13 end
14 assert(c >= 1);
15 bigpot = engine.bel_clpot{c};
16
17 pot = marginalize_pot(bigpot, j);
18 marginal = pot_to_marginal(pot);