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

📄 bnet_to_gdl_graph.m

📁 贝叶斯网络的matlab实现。可以创建贝叶斯网络、训练模型
💻 M
字号:
function gdl = bnet_to_gdl_graph(bnet)
% BNET_TO_GDL_GRAPH Convert a Bayesian network to a GDL graph
% gdl = bnet_to_gdl_graph(bnet)
%
% Each node in the BN gets converted to a single node in the GDL graph,
% representing its family; its kernel function is the corresponding CPD.

N = length(bnet.dag);
doms = cell(1,N);
for i=1:N
  doms{i} = family(bnet.dag, i);
end

U = mk_undirected(bnet.dag);
gdl = mk_gdl_graph(U, doms, bnet.node_sizes, bnet.CPD, 'equiv_class', bnet.equiv_class, ...
		   'discrete', bnet.dnodes, 'chance', bnet.chance_nodes, ...
		   'decision', bnet.decision_nodes, 'utility', bnet.utility_nodes);

⌨️ 快捷键说明

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