Mercurial > hg > camir-aes2014
annotate toolboxes/FullBNT-1.0.7/bnt/inference/static/@cond_gauss_inf_engine/cond_gauss_inf_engine.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function engine = cond_gauss_inf_engine(bnet) |
wolffd@0 | 2 % COND_GAUSS_INF_ENGINE Conditional Gaussian inference engine |
wolffd@0 | 3 % engine = cond_gauss_inf_engine(bnet) |
wolffd@0 | 4 % |
wolffd@0 | 5 % Enumerates all the discrete roots, and runs jtree on the remaining Gaussian nodes. |
wolffd@0 | 6 |
wolffd@0 | 7 dnodes = mysetdiff(1:length(bnet.dag), bnet.cnodes); |
wolffd@0 | 8 |
wolffd@0 | 9 %onodes = dnodes; % all the discrete ndoes will be observed |
wolffd@0 | 10 %engine.sub_engine = jtree_inf_engine(bnet, onodes); |
wolffd@0 | 11 bnet2 = bnet; |
wolffd@0 | 12 bnet2.observed = dnodes; |
wolffd@0 | 13 engine.sub_engine = jtree_inf_engine(bnet2); |
wolffd@0 | 14 |
wolffd@0 | 15 % This is where we will store the results between enter_evidence and marginal_nodes |
wolffd@0 | 16 engine.T = []; |
wolffd@0 | 17 engine.mu = []; |
wolffd@0 | 18 engine.Sigma = []; |
wolffd@0 | 19 engine.joint_dmarginal = []; |
wolffd@0 | 20 engine.onodes = []; % needed for marginal_nodes |
wolffd@0 | 21 engine.evidence = []; % needed for marginal_nodes add_ev |
wolffd@0 | 22 |
wolffd@0 | 23 engine = class(engine, 'cond_gauss_inf_engine', inf_engine(bnet)); |