Professional Documents
Culture Documents
LESSON 12
Reading
Chapter 14
3/21/2016
3
503043 - PROBABILISTIC REASONING
Motivations
P X i | Parents ( X i )
3/21/2016
5
503043 - PROBABILISTIC REASONING
Bayesian networks
Example 1: The Teeth Disease Bayesian
3/21/2016
6
503043 - PROBABILISTIC REASONING
Example: Burglar alarm system
John always calls when he hears the alarm, but sometimes confuses
the telephone ringing with the alarm and calls then, too.
Mary likes rather loud music and sometimes misses the alarm
altogether.
3/21/2016 7
Example: Burglar alarm system
Network topology reflects “causal” knowledge:
A burglar can set the alarm off
An earthquake can set the alarm off
The alarm can cause Mary to call
The alarm can cause John to call
3/21/2016 8
Compactness of Bayesian networks
A CPT for Boolean Xi with k Boolean parents has 2^k rows for the
combinations of parent values. Each row requires one number p for
Xi =true (the number for Xi =false is just 1-p)
, X n ) i 1 p( X i | Parents( X i ))
n
p( X 1 ,
e. g.
p ( j m a b e)
p( j | a ) p(m | a) p( a | b, e) p(b) p(e)
0.90 0.70 0.001 0.999 0.998
3/21/2016
0.00062
Local semantics of Bayesian network
3/21/2016 11
Markov blanket
3/21/2016
Constructing Bayesian networks
Need a method such that a series of locally testable assertions of
conditional independence guarantees the required global semantics.
The correct order in which to add nodes is to add the “root causes”
first, then the variables they influence, and so on.
What happens if we choose the wrong order?
3/21/2016 13
Example
3/21/2016 14
Example
3/21/2016 15
Example
3/21/2016 16
Example
3/21/2016 17
Example
3/21/2016 18
Example
3/21/2016 19
Example: Car diagnosis
Initial evidence: car won’t start
Testable variables (green), “broken, so fix it” variables (orange)
Hidden variables (gray) ensure sparse structure, reduce parameters
3/21/2016 20
Example: Car insurance
3/21/2016 21
Class Exercise
1. Using the axioms of probability, prove
2. Given Bayesian Network
p( P | P Q ) 1
◦ Calculate
◦ In what condition,
P p(P)
p( P Q ) Q p(Q|P), p(Q| ﹁ P)
p( P Q ) p(Q P )
3/21/2016
Efficient representation of conditional
distributions
3/21/2016
24
503043 - PROBABILISTIC REASONING
Efficient representation of conditional distributions
3/21/2016
25
503043 - PROBABILISTIC REASONING
Bayesian nets with continuous variables
Hybrid Bayesian network: discrete variables + continuous variables
Discrete (Subsidy? and Buys?); continuous (Harvest and Cost)
Two options
discretization – possibly large errors, large CPTs
finitely parameterized canonical families(E.g.: Gaussian Distribution )
3/21/2016
27
503043 - PROBABILISTIC REASONING
Continuous child variables
3/21/2016
28
503043 - PROBABILISTIC REASONING
Discrete variable with continuous parents
Probability of Buys?
given Cost should
be a “soft” threshold”
3/21/2016
30
503043 - PROBABILISTIC REASONING
Exact inference by enumeration
A query can be answered using a Bayesian network by computing
sums of products of conditional probabilities from the network.
Do the calculation once and save the results for later use – idea of
dynamic programming
Variable elimination: carry out summations right-to-left, storing
intermediate results (factors) to avoid re-computation
Direct sampling
Generate events from (an empty) network that has no associated evidence
Rejection sampling: reject samples disagreeing with evidence
Likelihood weighting: use evidence to weight samples
3/21/2016
36
503043 - PROBABILISTIC REASONING
Example of sampling from an empty network
3/21/2016
44
503043 - PROBABILISTIC REASONING
Rejection sampling
3/21/2016
45
503043 - PROBABILISTIC REASONING
Likelihood weighting
3/21/2016
46
503043 - PROBABILISTIC REASONING
Likelihood weighting
3/21/2016
48
503043 - PROBABILISTIC REASONING
Likelihood weighting
3/21/2016
50
503043 - PROBABILISTIC REASONING
Likelihood weighting
3/21/2016
51
503043 - PROBABILISTIC REASONING
Likelihood weighting
3/21/2016
53
503043 - PROBABILISTIC REASONING
Approximate inference using MCMC*
3/21/2016
54
503043 - PROBABILISTIC REASONING
The Markov chain
3/21/2016
55
503043 - PROBABILISTIC REASONING
MCMC example
3/21/2016
56
503043 - PROBABILISTIC REASONING
Markov blanket sampling
3/21/2016
57
503043 - PROBABILISTIC REASONING
3/21/2016 503043 - PROBABILISTIC REASONING 58