test_cpdag.m.svn-base

来自「bayesian network structrue learning mat」· SVN-BASE 代码 · 共 22 行

SVN-BASE
22
字号
% Test Dag2Cpdag and Cpdag2Dag functions ...

close all;
clear all;

bnet=mk_asia_bnet ;

n=8;
names={ 'A' , 'S' , 'T' , 'L' , 'B' , 'O' , 'X' , 'D' };
carre=ones(1,n);

[xx yy] = make_layout(bnet.dag);
yy=(yy-0.2)*.8/.6+.1;
xx=(xx-0.2833)*.8/.517+.1;

cpdag=dag_to_cpdag(bnet.dag) ;
dag1 = cpdag_to_dag(cpdag) ;

figure; 
subplot(1,3,1), draw_graph(bnet.dag,names,carre,xx,yy); title('original ASIA');
subplot(1,3,2), draw_graph(cpdag,names,carre,xx,yy); title('cpasia=DAGtoCPDAG(asia)');
subplot(1,3,3), draw_graph(dag1,names,carre,xx,yy); title('CPDAGtoDAG(cpasia)');

⌨️ 快捷键说明

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