Bayesia n net wor k s Chapter 14.1 3 Extracted from : - - PowerPoint PPT Presentation

bayesia n net wor k s
SMART_READER_LITE
LIVE PREVIEW

Bayesia n net wor k s Chapter 14.1 3 Extracted from : - - PowerPoint PPT Presentation

Bayesia n net wor k s Chapter 14.1 3 Extracted from : http://aima.eecs.berkeley.edu/slides-pdf/chapter14a.pdf Chapter 14.1 1 3 Outline Syntax Semantics Parameterized distributions Chapter 14.1 2 3 B ayesian


slide-1
SLIDE 1

Bayesia n net wor k s

Chapter 14.1–3

Chapter 14.1– 3 1

Extracted from : http://aima.eecs.berkeley.edu/slides-pdf/chapter14a.pdf

slide-2
SLIDE 2

Outline

♦ Syntax ♦ Semantics ♦ Parameterized distributions

Chapter 14.1– 3 2

slide-3
SLIDE 3

B ayesian networks

A simple, graphical notation for conditional independence assertions and hence for compact specification of full joint distributions Syntax: a set of nodes, one per variable a directed, acyclic graph (link ≈ “directly influences”) a conditional distribution for each node given its parents: P(Xi|Parents(Xi)) In the simplest case, conditional distribution represented as a conditional probability table (CPT) giving the distribution over Xi for each combination of parent values

Chapter 14.1– 3 3

slide-4
SLIDE 4

Exam ple

Topology of netw

  • rk encodes conditional independence assertions:

Weather Cavity Toothache Catch

Chapter 14.1– 3 4

Weather is independent of the other variables Toothache and Catch are conditionally independent given Cavity

slide-5
SLIDE 5

Exam ple

I’m at work, neighbor John calls to say my alarm is ringing, but neighbor Mary doesn’t call. Sometimes it’s set off by minor

  • earthquakes. Is there a burglar?

Variables: Burglar, Earthquake, Alarm, JohnCalls, MaryCalls 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

Chapter 14.1– 3 5

slide-6
SLIDE 6

Exam ple contd.

.001

P(B)

.002

P(E)

Alarm Earthquake MaryCalls JohnCalls Burglary

Chapter 14.1– 3 6

B E P(A|B,E)

T T .95 T F .94 F T .29 F F .001

A P(J|A)

T F .90 .05

A P(M|A)

T F .70 .01

slide-7
SLIDE 7

C om pactness

A CPT for Boolean Xi with k Boolean parents has 2k 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) If each variable has no more than k parents, the complete network requires O(n · 2k) numbers I.e., grows linearly with n, vs. O(2n) for the full joint distribution

Chapter 14.1– 3 7

B E J A M

For burglary net, 1 + 1 + 4 + 2 + 2 = 10 numbers (vs. 25 − 1 = 31)

slide-8
SLIDE 8

G lobal sem antics

“Global” semantics defines the full joint distribution as the product of the local conditional distributions:

Chapter 14.1– 3 8

B E J A M

P (x , . . . , x ) = Π P (x |parents(X ))

i i

e.g., P (j ∧ m ∧ a ∧ ¬b ∧ ¬e) = P (j|a)P (m|a)P (a|¬b, ¬e)P (¬b)P (¬e) = 0.9 × 0.7 × 0.001 × 0.999 × 0.998 ≈ 0.00063

1 n i = 1

n

slide-9
SLIDE 9

C onstru cting B ayesian networks

Need a method such that a series of locally testable assertions of conditional independence guarantees the required global semantics 1.Choose an ordering of variables X1, . . . , Xn 2.For i = 1 to n add Xi to the network select parents from X1, . . . , Xi−1 such that P(Xi |Parents (Xi)) = P(Xi|X1, . . . , Xi−1) This choice of parents guarantees the global semantics:

Chapter 14.1– 3 9

P(X , . . . , X ) =

1 n

n P P(X i |X1 , . . . , Xi-1 ) (chain rule) i=1

n

= P P(Xi| Parents(Xi)) (by construction)

i=n

slide-10
SLIDE 10

Exam ple

Suppose we choose the ordering M , J , A, B, E

MaryCalls

JohnCalls

Chapter 14.1– 3 10

P (J |M ) = P (J )?

slide-11
SLIDE 11

Exam ple

Suppose we choose the ordering M , J , A, B, E MaryCalls

JohnCalls Alarm

Chapter 14.1– 3 11

P (J |M ) = P (J )? No P (A|J, M ) = P (A|J )? P (A|J, M ) = P (A)?

slide-12
SLIDE 12

Exam ple

Suppose we choose the ordering M , J , A, B, E

MaryCalls

JohnCalls

Alarm

Chapter 14.1– 3 12

Burglary

P (J |M ) = P (J )? No P (A|J, M ) = P (A|J )? P (A|J, M ) = P (A)? No P (B|A, J, M ) = P (B|A)? P (B|A, J, M ) = P (B)?

slide-13
SLIDE 13

Exam ple

Suppose we choose the ordering M , J , A, B, E MaryCalls

JohnCalls

Alarm

Chapter 14.1– 3 13

Burglary Earthquake

P (J |M ) = P (J )? No P (A|J, M ) = P (A|J )? P (A|J, M ) = P (A)? No P (B|A, J, M ) = P (B|A)? Yes P (B|A, J, M ) = P (B)? No P (E|B, A, J, M ) = P (E|A)? P (E|B, A, J, M ) = P (E|A, B)?

slide-14
SLIDE 14

Exam ple

Suppose we choose the ordering M , J , A, B, E

MaryCalls JohnCalls

P (E|B, A, J, M ) = P (E|A, B)? Yes

Chapter 14.1– 3 14

Burglary

Earthquake P (J |M ) = P (J )? No P (A|J, M ) = P (A|J )? P (A|J, M ) = P (A)? No P (B|A, J, M ) = P (B|A)? Yes P (B|A, J, M ) = P (B)? No P (E|B, A, J, M ) = P (E|A)? No Alarm

slide-15
SLIDE 15

Exam ple contd.

MaryCalls JohnCalls Alarm

Network is less compact: 1 + 2 + 4 + 2 + 4 = 13 numbers needed

Chapter 14.1–3 15

Burglary Earthquake Deciding conditional independence is hard in noncausal directions (Causal models and conditional independence seem hardwired for humans!) Assessing conditional probabilities is hard in noncausal directions

slide-16
SLIDE 16

Exam ple: C ar diagnosis

Initial evidence: car won’t start Testable variables (green), “broken, so fix it” variables (orange) Hidden variables (gray) ensure sparse structure, reduce parameters

lights no oil no gas starter broken battery age alternator broken fanbelt broken battery dead no charging battery flat gas gauge fuel line blocked

  • il light

battery meter car won’t start dipstick

Chapter 14.1– 3 16

slide-17
SLIDE 17

Exam ple: C ar insurance

SocioEcon Age GoodStudent ExtraCar Mileage VehicleYear RiskAversion SeniorTrain DrivingSkill MakeModel DrivingHist DrivQuality Antilock Airbag CarValue HomeBase AntiTheft Theft OwnDamage PropertyCost LiabilityCost MedicalCost Cushioning Ruggedness Accident OtherCost OwnCost

Chapter 14.1– 3 17