wolffd@0: function engine = dbn_predict_bel(engine, lag) wolffd@0: % DBN_PREDICT_BEL Predict the belief state 'lag' steps into the future (bk_ff_hmm) wolffd@0: % engine = dbn_predict_bel(engine, lag) wolffd@0: % 'lag' defaults to 1 wolffd@0: wolffd@0: if nargin < 2, lag = 1; end wolffd@0: wolffd@0: for d=1:lag wolffd@0: %newbel = engine.transmat' * engine.bel; wolffd@0: newbel = normalise(engine.transmat' * engine.bel); wolffd@0: wolffd@0: hnodes = engine.hnodes; wolffd@0: bnet = bnet_from_engine(engine); wolffd@0: ns = bnet.node_sizes; wolffd@0: [marginals, marginalsT] = project_joint_onto_marginals(newbel, hnodes, ns); wolffd@0: newbel = combine_marginals_into_joint(marginalsT, hnodes, ns); wolffd@0: engine.bel_marginals = marginalsT; wolffd@0: engine.bel = newbel; wolffd@0: end