Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/examples/dynamic/HHMM/Square/sample_square_hhmm_discrete.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 % Generate samples from the HHMM with the true params. | |
2 | |
3 seed = 0; | |
4 rand('state', seed); | |
5 randn('state', seed); | |
6 | |
7 discrete_obs = 1; | |
8 | |
9 bnet = mk_square_hhmm(discrete_obs, 1); | |
10 | |
11 Tmax = 30; | |
12 Q1 = 1; Q2 = 2; Q3 = 3; F3 = 4; F2 = 5; Onode = 6; | |
13 Qnodes = [Q1 Q2 Q3]; Fnodes = [F2 F3]; | |
14 chars = ['L', 'l', 'U', 'u', 'R', 'r', 'D', 'd']; | |
15 | |
16 for seqi=1:3 | |
17 evidence = cell2num(sample_dbn(bnet, 'stop_test', 'is_F2_true_D3')); | |
18 T = size(evidence, 2) | |
19 pretty_print_hhmm_parse(evidence, Qnodes, Fnodes, Onode, chars); | |
20 end |