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

📄 test_bnpc.m.svn-base

📁 bayesian network structrue learning matlab program
💻 SVN-BASE
字号:
% test BNPCclose all;clear all;add_BNT_to_path;%test='pearson'; % Pearson's Chi2%test='LRT';     % Likelihood ratio test G2fprintf('\n=== Structure Learning with BN-PC (Power Constructor) algorithm\n');bnet=mk_asia_bnetPL ;n=8;names={ 'A' , 'S' , 'T' , 'L' , 'B' , 'O' , 'X' , 'D' };names={ '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' };carre=ones(1,n);fn='asia10000.mat' ;fprintf('\t- Loading Database : %s\n',fn);load(fn) ;data=asiab;clear asiab;  tmp=cputime;[Phase_3 Phase_2 Phase_1 U] = learn_struct_bnpc(data);%,2*ones(1,n),0.05,1);tmp=cputime-tmp;fprintf('\t- Execution time : %3.2f seconds\n',tmp);figure;[xx yy] = make_layout(bnet.dag);yy=(yy-0.2)*.8/.6+.1;xx=(xx-0.2833)*.8/.517+.1;subplot(2,3,1), [xx yy]=draw_graph(bnet.dag,names,carre,xx,yy); %,carre);title('ASIA original graph');subplot(2,3,2), draw_graph(Phase_1,names,carre,xx,yy); %,carre);title('BNPC Phase 1');subplot(2,3,3), draw_graph(Phase_2,names,carre,xx,yy); %,carre);title('BNPC Phase 2');subplot(2,3,4), draw_graph(U,names,carre,xx,yy); %,carre);title('BNPC Phase 3a');subplot(2,3,5), draw_graph(Phase_3,names,carre,xx,yy); %,carre);title('BNPC Phase 3b');subplot(2,3,6), draw_graph(pdag_to_dag(Phase_3),names,carre,xx,yy); %,carre);title('BNPC DAG');drawnow;

⌨️ 快捷键说明

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