comparison toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/Old/old.water1.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 % Compare the speeds of various inference engines on the water DBN
2
3 [bnet, onodes] = mk_water_dbn;
4
5 T = 3;
6
7 engine = {};
8 engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T, onodes);
9 engine{end+1} = hmm_inf_engine(bnet, onodes);
10 engine{end+1} = frontier_inf_engine(bnet, onodes);
11 engine{end+1} = jtree_dbn_inf_engine(bnet, onodes);
12 engine{end+1} = bk_inf_engine(bnet, 'exact', onodes);
13
14 engine{end+1} = bk_inf_engine(bnet, 'ff', onodes);
15 engine{end+1} = bk_inf_engine(bnet, { [1 2], [3 4 5 6], [7 8] }, onodes);
16
17 N = length(engine);
18 exact = 1:5;
19
20
21 filter = 0;
22 err = cmp_inference(bnet, onodes, engine, exact, T, filter);
23
24 % elapsed times for enter_evidence (matlab 5.3 on PIII with 256MB running Redhat linux)
25
26 % T = 5, 4/20/00
27 % 0.6266 unrolled *
28 % 0.3490 hmm *
29 % 1.1743 frontier
30 % 1.4621 old frontier
31 % 0.3270 fast frontier *
32 % 1.3926 jtree
33 % 1.3790 bk
34 % 0.4916 fast bk
35 % 0.4190 fast bk compiled
36 % 0.3574 fast jtree *
37
38
39 err = cmp_learning(bnet, onodes, engine, exact, T);
40
41 % elapsed times for learn_params_dbn_em (matlab 5.3 on PIII with 256MB running Redhat linux)
42
43 % T = 5, 2cases, 2 iter, 4/20/00
44 % 3.5750 unrolled
45 % 3.7475 hmm
46 % 2.1452 fast frontier
47 % 2.5724 fast bk compiled
48 % 2.3387 fast jtree