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