annotate toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/loopy_dbn1.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 N = 1; % single chain = HMM - should give exact answers
Daniel@0 2 Q = 2;
Daniel@0 3 rand('state', 0);
Daniel@0 4 randn('state', 0);
Daniel@0 5 discrete = 1;
Daniel@0 6 if discrete
Daniel@0 7 Y = 2; % size of output alphabet
Daniel@0 8 else
Daniel@0 9 Y = 1;
Daniel@0 10 end
Daniel@0 11 coupled = 1;
Daniel@0 12 bnet = mk_chmm(N, Q, Y, discrete, coupled);
Daniel@0 13 ss = N*2;
Daniel@0 14
Daniel@0 15 T = 3;
Daniel@0 16
Daniel@0 17 engine = {};
Daniel@0 18 engine{end+1} = jtree_dbn_inf_engine(bnet);
Daniel@0 19 engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T);
Daniel@0 20 engine{end+1} = pearl_unrolled_dbn_inf_engine(bnet, 'protocol', 'tree');
Daniel@0 21
Daniel@0 22 inf_time = cmp_inference_dbn(bnet, engine, T)
Daniel@0 23 learning_time = cmp_learning_dbn(bnet, engine, T)
Daniel@0 24