bnet_to_gdl_graph.m

来自「贝叶斯网络matlab源程序,可用于分类,欢迎大家下载测试」· M 代码 · 共 19 行

M
19
字号
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);endU = 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 + =
减小字号Ctrl + -
显示快捷键?