Mercurial > hg > camir-aes2014
annotate toolboxes/FullBNT-1.0.7/bnt/inference/static/@quickscore_inf_engine/enter_evidence.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function engine = enter_evidence(engine, pos, neg) |
wolffd@0 | 2 % ENTER_EVIDENCE Add evidence to the QMR network |
wolffd@0 | 3 % engine = enter_evidence(engine, pos, neg) |
wolffd@0 | 4 % |
wolffd@0 | 5 % pos = list of leaves that have positive observations |
wolffd@0 | 6 % neg = list of leaves that have negative observations |
wolffd@0 | 7 |
wolffd@0 | 8 % Extract params for the observed findings |
wolffd@0 | 9 obs = myunion(pos, neg); |
wolffd@0 | 10 %inhibit_obs = engine.inhibit(obs, :); |
wolffd@0 | 11 inhibit_obs = engine.inhibit(:,obs)'; |
wolffd@0 | 12 leak_obs = engine.leak(obs); |
wolffd@0 | 13 |
wolffd@0 | 14 % Find what nodes correspond to the original observed leaves |
wolffd@0 | 15 pos2 = find_equiv_posns(pos, obs); |
wolffd@0 | 16 neg2 = find_equiv_posns(neg, obs); |
wolffd@0 | 17 engine.post = quickscore(pos2, neg2, inhibit_obs, engine.prior, leak_obs); |
wolffd@0 | 18 %engine.post = C_quickscore(pos2, neg2, inhibit_obs, engine.prior, leak_obs); |
wolffd@0 | 19 |