Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2018-05-24
帖子: 1
声望力: 0 ![]() |
![]()
bnet=mk_bnet(DAG,node_sizes);
seed = 0; rand('state',seed); for i=1:N bnet.CPD{i} = tabular_CPD(bnet,i); end bnet2=learn_params(bnet,Sample); CPT1=cell(1,N) for i=i:N s=struct(bnet.CPD{i}); CPT1{i}=s.CPT; end ??? Error using ==> run Index exceeds matrix dimensions. 贝叶斯网络用k2算法已经生成,10个节点,2048个case,每个节点有两个取值,1,0.,这里的N=10,node_sizes={2,2,2,2,2,2,2,2,2,2} |
![]() |
![]() |