⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbn_predict.m

📁 Bayes网络工具箱
💻 M
字号:
function [engine] = dbn_predict(engine, bel, T, ev)% DBN_PREDICT K-step-ahead prediction (hmm)% [engine] = dbn_predict(engine, bel, K, ev, pot_type)%% bel = Pr(X(t-1)|Y(t-1)) is the prior% ev{i} is the evidence on slice t-1% We essentially unroll the network to create slices t-1, t, t+1, ..., t+K-1% so we can extract the predicted value of node i k steps into the future% using marginal_nodes(i, k+1)error('unfinished');onodes = find(~isemptycell(ev));hnodes = find(isemptycell(ev));bnet = bnet_from_engine(engine);ns = bnet.node_sizes_slice;assert(isequal(onodes, bnet.cnodes_slice)); % we currently assume observed leaves are Gaussiansassert(isequal(hnodes, bnet.dnodes_slice)); ns(onodes) = 1;alpha = zeros(prod(ns(hnodes)), T);M = engine.transmat';t = 1;alpha(:,t) = bel;for t=2:T  alpha(:,t) = M * alpha(:,t-1);end     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -