Daniel@0: N = 1; % single chain = HMM - should give exact answers Daniel@0: Q = 2; Daniel@0: rand('state', 0); Daniel@0: randn('state', 0); Daniel@0: discrete = 1; Daniel@0: if discrete Daniel@0: Y = 2; % size of output alphabet Daniel@0: else Daniel@0: Y = 1; Daniel@0: end Daniel@0: coupled = 1; Daniel@0: bnet = mk_chmm(N, Q, Y, discrete, coupled); Daniel@0: ss = N*2; Daniel@0: Daniel@0: T = 3; Daniel@0: Daniel@0: engine = {}; Daniel@0: engine{end+1} = jtree_dbn_inf_engine(bnet); Daniel@0: engine{end+1} = jtree_unrolled_dbn_inf_engine(bnet, T); Daniel@0: engine{end+1} = pearl_unrolled_dbn_inf_engine(bnet, 'protocol', 'tree'); Daniel@0: Daniel@0: inf_time = cmp_inference_dbn(bnet, engine, T) Daniel@0: learning_time = cmp_learning_dbn(bnet, engine, T) Daniel@0: