Download presentation
Presentation is loading. Please wait.
Published byAugust Kneller Modified over 6 years ago
1
CSCI 121 Special Topics: Bayesian Networks Lecture #2: Bayes Nets
2
Earthquake Burglary Alarm JohnCalls MaryCalls P(B=F) P(B=T) .999 .001
P(E=F) P(E=T) Earthquake Burglary B E P(A=F) P(A=T) F F T F F T T T Alarm JohnCalls MaryCalls A P(J=F) P(J=T) F T A P(M=F) P(M=T) F T
3
Why Use Bayes Nets? T T T T T Pm
Why not just use joint prob. (can be used to answer any query)? B E A J M P F F F F F P1 ... T T T T T Pm Table size is exponential (m=2n entries for n vars.) Network (graph) is sparse; only encodes local dependencies. n2k entries, where k = avg. # inputs to node.
4
Types of Inferences / Queries
Diagnostic: P(B | J) = 0.02 Causal: P(J | B) = 0.85 Intercausal: P(B | J & M & ~E) = 0.34 Explaining Away: A university accepts a student if s/he is a good scholar or good athlete. If an accepted student is a good scholar, is s/he a good athlete? (Berkson's Paradox / selection bias)
5
Answering Queries E.g., compute P(B|A)
Product Rule tells us that P(B|A) = P(B&A) / P(A) Problem: the only values we can obtain directly from the probability tables are the priors and some joint conditionals. For P(B&A) and P(A), the values are confounded with other variables (E). Solution: we can marginalize (sum out) the other variables to focus on the ones we care about First, we must convert the tables to joint probabilities of all relevant variables:
6
Answering Queries: Marginalization
B E A Prob T T T .001*.002*.95 = T T F .001*.002*.05 = T F T .001*.998*.94 = T F F .001*.998*.06 = F T T .999*.002*.29 = F T F .999*.002*.71 = F F T .999*.998*.001 = F F F .999*.998*.999 = P(B) .001 P(E) .002 B E P(A) T T .95 T F .94 F T .29 F F .001
7
Answering Queries: Marginalization
Now we get P(A) by summing over rows where A = True: B E A Prob T T T T T F T F T T F F F T T F T F F F T F F F P(A) =
8
Answering Queries: Marginalization
B E A Prob T T T T T F T F T T F F F T T F T F F F T F F F Next, we need to compute P(B&A) Again, we marginalize: So P(B|A) = / = P(B&A) =
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.