Mercurial > hg > camir-aes2014
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolboxes/FullBNT-1.0.7/bnt/inference/static/@quickscore_inf_engine/enter_evidence.m Tue Feb 10 15:05:51 2015 +0000 @@ -0,0 +1,19 @@ +function engine = enter_evidence(engine, pos, neg) +% ENTER_EVIDENCE Add evidence to the QMR network +% engine = enter_evidence(engine, pos, neg) +% +% pos = list of leaves that have positive observations +% neg = list of leaves that have negative observations + +% Extract params for the observed findings +obs = myunion(pos, neg); +%inhibit_obs = engine.inhibit(obs, :); +inhibit_obs = engine.inhibit(:,obs)'; +leak_obs = engine.leak(obs); + +% Find what nodes correspond to the original observed leaves +pos2 = find_equiv_posns(pos, obs); +neg2 = find_equiv_posns(neg, obs); +engine.post = quickscore(pos2, neg2, inhibit_obs, engine.prior, leak_obs); +%engine.post = C_quickscore(pos2, neg2, inhibit_obs, engine.prior, leak_obs); +