wolffd@0: function engine = kalman_inf_engine(bnet) wolffd@0: % KALMAN_INF_ENGINE Inference engine for Linear-Gaussian state-space models. wolffd@0: % engine = kalman_inf_engine(bnet) wolffd@0: % wolffd@0: % 'onodes' specifies which nodes are observed; these must be leaves. wolffd@0: % The remaining nodes are all hidden. All nodes must have linear-Gaussian CPDs. wolffd@0: % The hidden nodes must be persistent, i.e., they must have children in wolffd@0: % the next time slice. In addition, they may not have any children within the current slice, wolffd@0: % except to the observed leaves. In other words, the topology must be isomorphic to a standard LDS. wolffd@0: % wolffd@0: % There are many derivations of the filtering and smoothing equations for Linear Dynamical wolffd@0: % Systems in the literature. I particularly like the following wolffd@0: % - "From HMMs to LDSs", T. Minka, MIT Tech Report, (no date), available from wolffd@0: % ftp://vismod.www.media.mit.edu/pub/tpminka/papers/minka-lds-tut.ps.gz wolffd@0: wolffd@0: [engine.trans_mat, engine.trans_cov, engine.obs_mat, engine.obs_cov, engine.init_state, engine.init_cov] = ... wolffd@0: dbn_to_lds(bnet); wolffd@0: wolffd@0: % This is where we will store the results between enter_evidence and marginal_nodes wolffd@0: engine.one_slice_marginal = []; wolffd@0: engine.two_slice_marginal = []; wolffd@0: wolffd@0: engine = class(engine, 'kalman_inf_engine', inf_engine(bnet));