Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/general/Old/compute_interface_nodes.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function [int, persist, transient] = compute_interface_nodes(intra, inter) | |
2 % COMPUTE_INTERFACE_NODES Find the nodes in a DBN that represent a sufficient statistic | |
3 % [int, persist, transient] = compute_interface_nodes(intra, inter) | |
4 % | |
5 % The interface nodes are all those that has an incoming temporal arc, | |
6 % or which have a child which has an incoming temporal arc, | |
7 % where a temporal arc means one coming from the previous slice. | |
8 % (The parents of nodes with incoming temporal arcs are needed | |
9 % because moralization will bring them into the clique.) | |
10 % | |
11 % The persisent nodes are all those that have one or more incoming temporal arc. | |
12 % The transient nodes are all the non-persistent. | |
13 % | |
14 % See U. Kjaerulff, "dHugin: A computational system for dynamic | |
15 % time-sliced Bayesian networks", Intl. J. Forecasting (11) 89-111, 1995 | |
16 | |
17 n = length(intra); | |
18 int = []; | |
19 persist = []; | |
20 for u=1:n | |
21 if any(inter(:,u)) | |
22 int = [int u]; | |
23 persist = [persist u]; | |
24 end | |
25 if any(inter(:, children(intra, u))) | |
26 int = [int u]; | |
27 end | |
28 end | |
29 int = unique(int); | |
30 persist = unique(persist); | |
31 transient = mysetdiff(1:n, persist); |