comparison toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/mildew1.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 bnet = mk_mildew_dbn;
2
3 T = 4;
4 engine = {};
5 engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T);
6 engine{end+1} = jtree_dbn_inf_engine(bnet);
7 %engine{end+1} = hmm_inf_engine(bnet); % 8 is observed but has kids
8 engine{end+1} = smoother_engine(jtree_2TBN_inf_engine(bnet));
9 %engine{end+1} = smoother_engine(hmm_2TBN_inf_engine(bnet));
10
11 inf_time = cmp_inference_dbn(bnet, engine, T, 'check_ll', 0)
12 %learning_time = cmp_learning_dbn(bnet, engine, T)
13
14 S = struct(engine{1});
15 S1 = struct(S.unrolled_engine);
16 G = S1.jtree;
17 %graph_to_dot(G, 'directed', 0, 'leftright', 1, ...
18 % 'filename', '/home/eecs/murphyk/WP/Thesis/Figures/Inf/Mildew/jtree.dot')
19 %!dot -Tps jtree.dot -o jtree.ps
20 % The resulting ps file cannot be converted using ps2pdf.
21
22 N = length(G);
23 for i=1:N
24 for j=1:N
25 if G(i,j)
26 G(j,i)=1;
27 end
28 end
29 end
30 draw_graph(G)