comparison toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/Old/chmm1.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 a coupled HMM
2
3 N = 2;
4 Q = 2;
5 rand('state', 0);
6 randn('state', 0);
7 discrete = 1;
8 if discrete
9 Y = 2; % size of output alphabet
10 else
11 Y = 1;
12 end
13 coupled = 1;
14 [bnet, onodes] = mk_chmm(N, Q, Y, discrete, coupled);
15 ss = N*2;
16
17 T = 3;
18
19
20 engine = {};
21 tic; engine{end+1} = jtree_dbn_inf_engine(bnet, 'observed', onodes); toc
22 %tic; engine{end+1} = jtree_ndxSD_dbn_inf_engine(bnet, onodes); toc
23 %tic; engine{end+1} = jtree_ndxB_dbn_inf_engine(bnet, onodes); toc
24 engine{end+1} = hmm_inf_engine(bnet, onodes);
25 %engine{end+1} = dhmm_inf_engine(bnet, onodes);
26 tic; engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T, onodes); toc
27
28 %engine{end+1} = bk_inf_engine(bnet, 'ff', onodes);
29 %engine{end+1} = loopy_dbn_inf_engine(bnet, onodes);
30
31 exact = [1 2 3];
32
33 filter = 0;
34 single = 0;
35 maximize = 0;
36
37 [err, time, engine] = cmp_inference(bnet, onodes, engine, exact, T, filter, single, maximize);
38 %err = cmp_learning(bnet, onodes, engine, exact, T);
39
40