Mercurial > hg > camir-aes2014
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolboxes/FullBNT-1.0.7/bnt/inference/dynamic/@bk_ff_hmm_inf_engine/dbn_predict_bel.m Tue Feb 10 15:05:51 2015 +0000 @@ -0,0 +1,19 @@ +function engine = dbn_predict_bel(engine, lag) +% DBN_PREDICT_BEL Predict the belief state 'lag' steps into the future (bk_ff_hmm) +% engine = dbn_predict_bel(engine, lag) +% 'lag' defaults to 1 + +if nargin < 2, lag = 1; end + +for d=1:lag + %newbel = engine.transmat' * engine.bel; + newbel = normalise(engine.transmat' * engine.bel); + + hnodes = engine.hnodes; + bnet = bnet_from_engine(engine); + ns = bnet.node_sizes; + [marginals, marginalsT] = project_joint_onto_marginals(newbel, hnodes, ns); + newbel = combine_marginals_into_joint(marginalsT, hnodes, ns); + engine.bel_marginals = marginalsT; + engine.bel = newbel; +end