To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / _FullBNT / BNT / CPDs / @hhmmF_CPD / Old / update_CPT.m @ 8:b5b38998ef3b
History | View | Annotate | Download (374 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.Qsizes(CPD.Q); |
| 6 |
Qpsz = prod(CPD.Qsizes(CPD.Qps)); |
| 7 |
|
| 8 |
% P(Q(1:d-1), Q(d), F(d+1), F(d)) |
| 9 |
CPT = zeros(Qpsz, Qsz, 2, 2); |
| 10 |
CPT(:,:,1,1) = 1; % if F(d+1)=1, then F(d)=1 |
| 11 |
CPT(:,:,2,:) = CPD.termprob; |
| 12 |
|
| 13 |
CPD = set_fields(CPD, 'CPT', CPT); |