Mercurial > hg > camir-aes2014
annotate toolboxes/FullBNT-1.0.7/bnt/inference/dynamic/@bk_ff_hmm_inf_engine/dbn_predict_bel.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 function engine = dbn_predict_bel(engine, lag) |
wolffd@0 | 2 % DBN_PREDICT_BEL Predict the belief state 'lag' steps into the future (bk_ff_hmm) |
wolffd@0 | 3 % engine = dbn_predict_bel(engine, lag) |
wolffd@0 | 4 % 'lag' defaults to 1 |
wolffd@0 | 5 |
wolffd@0 | 6 if nargin < 2, lag = 1; end |
wolffd@0 | 7 |
wolffd@0 | 8 for d=1:lag |
wolffd@0 | 9 %newbel = engine.transmat' * engine.bel; |
wolffd@0 | 10 newbel = normalise(engine.transmat' * engine.bel); |
wolffd@0 | 11 |
wolffd@0 | 12 hnodes = engine.hnodes; |
wolffd@0 | 13 bnet = bnet_from_engine(engine); |
wolffd@0 | 14 ns = bnet.node_sizes; |
wolffd@0 | 15 [marginals, marginalsT] = project_joint_onto_marginals(newbel, hnodes, ns); |
wolffd@0 | 16 newbel = combine_marginals_into_joint(marginalsT, hnodes, ns); |
wolffd@0 | 17 engine.bel_marginals = marginalsT; |
wolffd@0 | 18 engine.bel = newbel; |
wolffd@0 | 19 end |