To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _FullBNT / BNT / CPDs / mk_isolated_tabular_CPD.m @ 8:b5b38998ef3b

History | View | Annotate | Download (461 Bytes)

1
function CPD = mk_isolated_tabular_CPD(fam_sz, args)
2
% function CPD = mk_isolated_tabular_CPD(fam_sz, args)
3
% function CPD = mk_isolated_tabular_CPD(fam_sz, args)
4
% Make a single CPD by creating a mini-bnet containing just this one family.
5
% This is necessary because the CPD constructor requires a bnet.
6

    
7
n = length(fam_sz);
8
dag = zeros(n,n);
9
ps = 1:(n-1);
10
if ~isempty(ps)
11
  dag(ps,n) = 1;
12
end
13
bnet = mk_bnet(dag, fam_sz);
14
CPD = tabular_CPD(bnet, n, args{:});