annotate toolboxes/FullBNT-1.0.7/bnt/CPDs/mk_isolated_tabular_CPD.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function CPD = mk_isolated_tabular_CPD(fam_sz, args)
wolffd@0 2 % function CPD = mk_isolated_tabular_CPD(fam_sz, args)
wolffd@0 3 % function CPD = mk_isolated_tabular_CPD(fam_sz, args)
wolffd@0 4 % Make a single CPD by creating a mini-bnet containing just this one family.
wolffd@0 5 % This is necessary because the CPD constructor requires a bnet.
wolffd@0 6
wolffd@0 7 n = length(fam_sz);
wolffd@0 8 dag = zeros(n,n);
wolffd@0 9 ps = 1:(n-1);
wolffd@0 10 if ~isempty(ps)
wolffd@0 11 dag(ps,n) = 1;
wolffd@0 12 end
wolffd@0 13 bnet = mk_bnet(dag, fam_sz);
wolffd@0 14 CPD = tabular_CPD(bnet, n, args{:});