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 / @root_CPD / CPD_to_pi.m @ 8:b5b38998ef3b
History | View | Annotate | Download (345 Bytes)
| 1 |
function pi = CPD_to_pi(CPD, msg_type, n, ps, msg, evidence) |
|---|---|
| 2 |
% CPD_TO_PI Compute the pi vector (root) |
| 3 |
% function pi = CPD_to_pi(CPD, msg_type, n, ps, msg, evidence) |
| 4 |
|
| 5 |
self_ev = evidence{n};
|
| 6 |
switch msg_type |
| 7 |
case 'd', |
| 8 |
error('root_CPD can''t create discrete msgs')
|
| 9 |
case 'g', |
| 10 |
pi.mu = self_ev; |
| 11 |
pi.Sigma = zeros(size(self_ev)); |
| 12 |
end |