comparison toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/ehmm1.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 % make the structure of an embedded HMM with 2 rows and 3 columns
2
3 % 1------------>2
4 % |\ \ | \ \
5 % 3->4->5 6->7->8
6
7 n = 8;
8 dag = zeros(n);
9 dag(1,[2 3 4 5])=1;
10 dag(2,[6 7 8])=1;
11 for i=3:4
12 dag(i,i+1)=1;
13 end
14 for i=6:7
15 dag(i,i+1)=1;
16 end
17 ns = 2*ones(1,n);
18 bnet = mk_bnet(dag,ns);
19 for i=1:n
20 bnet.CPD{i}=tabular_CPD(bnet,i);
21 end
22 [jtree, root, cliques] = graph_to_jtree(moralize(bnet.dag), ones(1,n), {}, {});
23 %[jtree, root, cliques, B, w, elim_order, moral_edges, fill_in_edges] = dag_to_jtree(bnet);
24