annotate toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/loopy_dbn1.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 N = 1; % single chain = HMM - should give exact answers
wolffd@0 2 Q = 2;
wolffd@0 3 rand('state', 0);
wolffd@0 4 randn('state', 0);
wolffd@0 5 discrete = 1;
wolffd@0 6 if discrete
wolffd@0 7 Y = 2; % size of output alphabet
wolffd@0 8 else
wolffd@0 9 Y = 1;
wolffd@0 10 end
wolffd@0 11 coupled = 1;
wolffd@0 12 bnet = mk_chmm(N, Q, Y, discrete, coupled);
wolffd@0 13 ss = N*2;
wolffd@0 14
wolffd@0 15 T = 3;
wolffd@0 16
wolffd@0 17 engine = {};
wolffd@0 18 engine{end+1} = jtree_dbn_inf_engine(bnet);
wolffd@0 19 engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T);
wolffd@0 20 engine{end+1} = pearl_unrolled_dbn_inf_engine(bnet, 'protocol', 'tree');
wolffd@0 21
wolffd@0 22 inf_time = cmp_inference_dbn(bnet, engine, T)
wolffd@0 23 learning_time = cmp_learning_dbn(bnet, engine, T)
wolffd@0 24