comparison toolboxes/FullBNT-1.0.7/bnt/inference/static/@quickscore_inf_engine/quickscore_inf_engine.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 engine = quickscore_inf_engine(inhibit, leak, prior)
2 % QUICKSCORE_INF_ENGINE Exact inference for the QMR network
3 % engine = quickscore_inf_engine(inhibit, leak, prior)
4 %
5 % We create an inference engine for QMR-like networks.
6 % QMR is a bipartite graph, where the top layer contains hidden disease nodes,
7 % and the bottom later contains observed finding nodes.
8 % The diseases have Bernoulli CPDs, the findings noisy-or CPDs.
9 % The original QMR (Quick Medical Reference) network has specific parameter values which we are not
10 % allowed to release, for commercial reasons.
11 %
12 % inhibit(f,d) = inhibition probability on f->d arc for disease d, finding f
13 % If inhibit(f,d) = 1, there is effectively no arc from d->f
14 % leak(j) = inhibition prob. on leak node -> finding j arc
15 % prior(i) = prob. disease i is on
16 %
17 % We use exact inference, which takes O(2^P) time, where P is the number of positive findings.
18 % For details, see
19 % - Heckerman, "A tractable inference algorithm for diagnosing multiple diseases", UAI 89.
20 % - Rish and Dechter, "On the impact of causal independence", UCI tech report, 1998.
21 % Note that this algorithm is numerically unstable, since it adds a large number of positive and
22 % negative terms and hopes that some of them exactly cancel.
23 %
24 % For an interesting variational approximation, see
25 % - Jaakkola and Jordan, "Variational probabilistic inference and the QMR-DT network", JAIR 10, 1999.
26 %
27 % See also
28 % - "Loopy belief propagation for approximate inference: an empirical study",
29 % K. Murphy, Y. Weiss and M. Jordan, UAI 99.
30
31 engine.inhibit = inhibit;
32 engine.leak = leak;
33 engine.prior = prior;
34
35 % store results here between enter_evidence and marginal_nodes
36 engine.post = [];
37
38 engine = class(engine, 'quickscore_inf_engine'); % not a child of the inf_engine class!