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

📄 compute_posterior_dbn.m

📁 贝叶斯算法(matlab编写) 安装,添加目录 /home/ai2/murphyk/matlab/FullBNT
💻 M
字号:
function post = compute_posterior_dbn(bnet, state, i, n, strides, families, ...				  CPT)% COMPUTE_POSTERIOR%% post = compute_posterior(bnet, state, i, n, strides, families,% cpts)%% Compute the posterior distribution on node X_i^n of a DBN,% conditional on evidence in the cell array state%% strides is the cached result of compute_strides(bnet)% families is the cached result of compute_families(bnet)% cpt is the cached result of get_cpts(bnet)%% post is a one-dimensional table% First multiply in the cpt of the node itselfpost = get_slice_dbn(bnet, state, i, n, i, n, strides, families, CPT);post = post(:);% Then multiply in CPTs of children that are in this slicefor j = children(bnet.intra, i)  slice = get_slice_dbn(bnet, state, j, n, i, n, strides, families, CPT);  post = post.*slice(:);end% Finally, if necessary, multiply in CPTs of children in the next% slice if (n < size(state,2))  for j = children(bnet.inter, i)    slice = get_slice_dbn(bnet, state, j, n+1, i, n, strides, families, ...			    CPT);    post = post.*slice(:);  endendpost = normalise(post);

⌨️ 快捷键说明

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