Mercurial > hg > mauch-mirex-2010
annotate _FullBNT/BNT/general/Old/compute_interface_nodes.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function [int, persist, transient] = compute_interface_nodes(intra, inter) |
matthiasm@8 | 2 % COMPUTE_INTERFACE_NODES Find the nodes in a DBN that represent a sufficient statistic |
matthiasm@8 | 3 % [int, persist, transient] = compute_interface_nodes(intra, inter) |
matthiasm@8 | 4 % |
matthiasm@8 | 5 % The interface nodes are all those that has an incoming temporal arc, |
matthiasm@8 | 6 % or which have a child which has an incoming temporal arc, |
matthiasm@8 | 7 % where a temporal arc means one coming from the previous slice. |
matthiasm@8 | 8 % (The parents of nodes with incoming temporal arcs are needed |
matthiasm@8 | 9 % because moralization will bring them into the clique.) |
matthiasm@8 | 10 % |
matthiasm@8 | 11 % The persisent nodes are all those that have one or more incoming temporal arc. |
matthiasm@8 | 12 % The transient nodes are all the non-persistent. |
matthiasm@8 | 13 % |
matthiasm@8 | 14 % See U. Kjaerulff, "dHugin: A computational system for dynamic |
matthiasm@8 | 15 % time-sliced Bayesian networks", Intl. J. Forecasting (11) 89-111, 1995 |
matthiasm@8 | 16 |
matthiasm@8 | 17 n = length(intra); |
matthiasm@8 | 18 int = []; |
matthiasm@8 | 19 persist = []; |
matthiasm@8 | 20 for u=1:n |
matthiasm@8 | 21 if any(inter(:,u)) |
matthiasm@8 | 22 int = [int u]; |
matthiasm@8 | 23 persist = [persist u]; |
matthiasm@8 | 24 end |
matthiasm@8 | 25 if any(inter(:, children(intra, u))) |
matthiasm@8 | 26 int = [int u]; |
matthiasm@8 | 27 end |
matthiasm@8 | 28 end |
matthiasm@8 | 29 int = unique(int); |
matthiasm@8 | 30 persist = unique(persist); |
matthiasm@8 | 31 transient = mysetdiff(1:n, persist); |