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 / @hhmmF_CPD / update_CPT.m @ 8:b5b38998ef3b

History | View | Annotate | Download (356 Bytes)

1
function CPD = update_CPT(CPD)
2
% Compute the big CPT for an HHMM F node given internal termprob
3
% function CPD = update_CPT(CPD)
4

    
5
Qsz = CPD.Qsz;
6
Qpsz = CPD.Qpsz;
7

    
8
% CPT(Qpsz, Q, Fbelow, Fself)
9
CPT = zeros(Qpsz, Qsz, 2, 2);
10
CPT(:,:,1,1) = 1; % if Fbelow=1 (off), then Fself=1 (off)
11
CPT(:,:,2,:) = CPD.termprob;
12

    
13
CPD = set_fields(CPD, 'CPT', CPT);