comparison toolboxes/FullBNT-1.0.7/GraphViz/draw_dbn_test.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 % TEST_LAYOUT_DBN Script to test some DBN layouts
2 %
3
4 % Change History :
5 % Date Time Prog Note
6 % 17-Apr-2000 2:40 PM ATC Created under MATLAB 5.3.1.29215a (R11.1)
7
8 % ATC = Ali Taylan Cemgil,
9 % SNN - University of Nijmegen, Department of Medical Physics and Biophysics
10 % e-mail : cemgil@mbfys.kun.nl
11
12 disp('draw mhmm1')
13 clf
14 set(gcf, 'pos', [0 0 1024 600]);
15
16 intra = zeros(3);
17 intra(1,[2 3]) = 1;
18 intra(2,3) = 1;
19 inter = zeros(3);
20 inter(1,1) = 1;
21 n = 3;
22 dnodes = [1 2];
23 isbox = zeros(n,1); isbox(dnodes) = 1;
24 unfold = 4;
25 draw_dbn(intra, inter, 0, unfold, {'Q', 'M', 'Y'}, isbox);
26
27
28 pause
29 clf
30 disp('draw water1')
31 bnet = mk_water_dbn;
32 unfold = 3;
33 flip = 1;
34 [dummyx, dummyy, h] = draw_dbn(bnet.intra, bnet.inter, flip, unfold);
35
36 col = rand(size(h,1),3);
37 for i=1:length(h),
38 col = rand(1,3);
39 % patches
40 set(h(i,2),'facecolor', col); drawnow;
41 % text
42 set(h(i,1),'color', 1-col); drawnow;
43 end;
44
45
46 pause
47 clf
48 disp('draw BAT static')
49 % This requires BNT
50
51 %sz = get(0, 'ScreenSize');
52 %sv = get(gcf, 'pos');
53 %set(gcf, 'units','pix','pos', sz);
54 [bnet, names] = mk_bat_dbn;
55 N = size(bnet.intra,1);
56 G = [bnet.intra bnet.inter;
57 zeros(N,N) bnet.intra];
58 names2 = names;
59 for i=1:N
60 names2{i} = sprintf('%s(1)', names{i});
61 names2{i+N} = sprintf('%s(2)', names{i});
62 end
63 draw_graph(G, names2);
64
65 pause
66 disp('draw bat dbn')
67 clf
68 draw_dbn(bnet.intra, bnet.inter, 0, 2, names2);