comparison toolboxes/FullBNT-1.0.7/bnt/inference/static/@jtree_inf_engine/marginal_family.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 function marginal = marginal_family(engine, i, add_ev)
2 % MARGINAL_FAMILY Compute the marginal on the specified family (jtree)
3 % marginal = marginal_family(engine, i)
4
5 if nargin < 3, add_ev = 0; end
6 assert(~add_ev);
7
8 bnet = bnet_from_engine(engine);
9 fam = family(bnet.dag, i);
10 c = engine.clq_ass_to_node(i);
11 marginal = pot_to_marginal(marginalize_pot(engine.clpot{c}, fam));