Mercurial > hg > camir-ismir2012
comparison toolboxes/FullBNT-1.0.7/bnt/general/do_intervention.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cc4b1211e677 |
---|---|
1 function bnet = mutilate_bnet(bnet, nodes, vals) | |
2 % MUTILATE_BNET Clamp nodes to specific values (perform a surgical intervention) | |
3 % bnet = mutilate_bnet(bnet, nodes, vals) | |
4 % | |
5 % We make all the clamped nodes roots. | |
6 | |
7 ns = bnet.node_sizes; | |
8 for i=1:length(nodes) | |
9 X = nodes(i); | |
10 x = vals(i); | |
11 bnet.dag(:,X) = 0; | |
12 bnet.CPD{X} = root_CPD(bnet, X, x); | |
13 end |