Docsity

Probabilistic Reasoning - Lecture Notes | 22C 145, Study notes of Computer Science

Toggle sidebar
bg1
22c:145 Artificial Intelligence
Fall 2005
Probabilistic Reasoning
Cesare Tinelli
The University of Iowa
Copyright 2001-05 — Cesare Tinelli and Hantao Zhang. a
aThese notes are copyrighted material and may not be used in other course settings outside of the
University of Iowa in their current or modified form without the express written permission of the copyright
holders. 22c:145 Artificial Intelligence, Fall’05 – p.1/27
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f

Partial preview of the text

Download Probabilistic Reasoning - Lecture Notes | 22C 145 and more Study notes Computer Science in PDF only on Docsity!

22c:145 Artificial Intelligence

Fall 2005 Probabilistic Reasoning Cesare TinelliThe University of Iowa Copyright 2001-05 — Cesare Tinelli and Hantao Zhang.

a a^ These notes are copyrighted material and may not be used in other course settings outside of theUniversity of Iowa in their current or modified form without the express written permission of the copyrightholders.^

22c:145 Artificial Intelligence, Fall’05 – p.1/

Readings Chap. 14 of [Russell and Norvig, 2003]

22c:145 Artificial Intelligence, Fall’05 – p.2/

x∧· · ·∧X=^ x)^ |^ x^1 n^ n

  • Review of Some Concepts The JPD is a collection of probabilties: P(X, , X) = {P (X= 1 n
    • Conditional Probability: P (X= x| X=^1 1 ∈ Domain(X)}i i
      • P (X=x∧X=^112 x) =
      • x)^2 P (X=x)
        • or P (X= x∧ X= x^1 1 2
          • ) = P (X= x| X^1
          • = x)P (X= x) 2 22 2 22c:145 Artificial Intelligence, Fall’05 – p.4/

Review of Some Concepts (2) Chain rule: P (X=^ x|^ X=^ x, ..., X^1 1 2

P^ (X=x^11 = x) = (^) n n ∧X=x∧···∧X=x)^22 nn P (X=x∧···∧X=x) 22 nn or P^ (X=^ x∧^ X=^ x^1 1 2

∧ · · · ∧^ X=^ x) n^ n = P (X= x| X=^ x, ..., X=^ x)P^ (X 1 1 2 2 n^ n

=^ x∧ · · · ∧^ X=^ x 2 2 n^ n ∏n = P^ (X=^ x|^ i^ i^ i=^ X=^ x, ..., X=i+1^ i+1n^

x)n Conditional Independence: If^ P^ (X=^1

x|^ X=^ x, ..., X=^1 2 2 n^

x)^ =n P^ (X=^ x|^ X=^ x^1 1 2

, ..., X=^ x)n−^1 n−^1 then we say^ X=^ x^1

is^ conditionally independent

from^ X=^ xn^ n given the evidence^ X

=^ x, ..., X=^ x 2 2 n−^1 n

.^ − 1 22c:145 Artificial Intelligence, Fall’05 – p.5/

Belief Networks Let X,... , Xbe discrete random variables. 1 n^ A belief network (or Bayesian network)

for^ X,... , Xis a graph with^1 n^ m^ nodes such that^ there is a node for each

X,i all the edges between two nodes are directed, there are no cycles, each node has a conditional probability table (CPT), given interms of the node’s parents.The intuitive meaning of an edge from a node

Xto a node^ Xisi^ j^ that^ Xhas a direct influence oni^

X.j^

22c:145 Artificial Intelligence, Fall’05 – p.7/

Network Semantics The topology of the network encodes conditional independenceassertions: Example:^ Weather^

Cavity Toothache^ Catch W eather^ is^ independent

from the other variables. T oothache^ and^ Catch

are^ conditionally independent given Cavity.

22c:145 Artificial Intelligence, Fall’05 – p.8/

A Belief Network with CPTs

P(E) P(B) Earthquake^ .002 .001 B E P(A) T T .95 AlarmTFFT.29FF.001 MaryCalls

Burglary P(J)^ A^^ T.90JohnCallsF^.

.94^ A^ P(M)^ T.70F^. Note:^ The tables only show

P^ (X)^ here because

P^ (¬X) = 1^ −^ P^ (X).^ 22c:145 Artificial Intelligence, Fall’05 – p.10/

The Semantics of BeliefNetworks There are two equivalent ways to interpret a belief network for thevariables X,... , X:^1 n 1. The network is a representation of the JPD

P(X,... , X).^1 n

2.^ The network is a collection of conditional independencestatements about

X,... , X.^1 n Interpretation 1 is helpful when

constructing belief networks

Interpretation 2 is helpful in

designing inference procedures

on top of them.

22c:145 Artificial Intelligence, Fall’05 – p.11/

Belief Network as JPDs P (X= x∧ · · · ∧^ X=^ x) = 1 1 n^ n

∏n P^ (X=^ x|^ P arentsi^ i^ i=^

(X))i B E P(A) T T .95TFFT.29FF. P(B)^.

P(E)^. Burglary^ Earthquake^ Alarm P(J)^ A^^ T.90JohnCalls^ MaryCallsF.

.94^ A^ P(M)^ T.70F^. 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.^00062 22c:145 Artificial Intelligence, Fall’05 – p.13/

Belief Networks andConditional Independence Let {X, X,... , X}^ be any set of nodes in the network so that 12 n all the parents of^ Xare in^1

{X,... , X},^2 n no node in^ {X,... , X^2

}^ is a descendant ofn

X.^1

Let^ 〈x,... , x〉^ be a value assignment for^1 n

〈X,... , X〉.^1 n From the equation^ P^ (X=^ x∧ · · · ∧^ X^1

n∏= x) =^ P^ (Xn ni i= =^ x|^ P arents(X))^ i^ i

we can show that^ P^ (X=^ x|^ X=^ x^1 1

∧ · · · ∧^ X=^ x) = 2 n^ n P^ (X=^ x|^ P arents^1

(X))^1 22c:145 Artificial Intelligence, Fall’05 – p.14/

Belief Networks andConditional Independence An equivalent result is: Given all its parents, children, and children’s parents

as evidence, each node in the network is conditionallyindependent from^ all the other nodes

. U Um 1... X Z Z^ 1jnj Y Yn 1...^ 22c:145 Artificial Intelligence, Fall’05 – p.16/

Belief Networks andConditional Independence P (X= x|^ X=^ x∧ · · · ∧^ X 1 1 2 2 n

=^ x) =^ P^ (X=^ x n^1

|^ P arents(X)) 1 Examples:^ P^ (B^ |^ E) =^ P^ (B

) P (J | M ∧ A) = P^ (J^ |^ A) P (J | A ∧ E) = P^ (J^ |^ A) P (J | A ∧ B ∧ E) =^ P^ (J^ |^ A) P (J | M ∧ A ∧ B^ ∧^ E) =^ P^ (J^ |^ A)

Burglary^ Earthquake^ Alarm JohnCalls^ MaryCalls Exercise:^ Find all the conditional independences holding in thisnetwork.

22c:145 Artificial Intelligence, Fall’05 – p.17/

Constructing Belief Networks:General Procedure 1. Identify a set of random variables

{X}that describe theii^ domain. 2. Choose an ordering^

X,... , Xof the variables.^1 n^

3.^ Start with an empty network. 4.^ For^ i^ = 1 to^ n:^ (a)^ add^ Xto the network.i^ (b)^ Select as parents of

Xnodes from^ X,... , Xi^1

such thati− 1 P(X|^ P arents(X)) =i^ i

P(X|^ X,... , Xi^1 i−^1

(c)^ Fill in the CPT for

X.i This choice of parents guarantees the network semantics:^ P(X,... , X)^ =^1 n

∏nP(X|^ X,... , Xi^1 i^ = 1^

)^ (chain rule)i− 1 ∏n = P(X|^ P arentsi^ i^ = 1^

(X))^ (by construction)i^ 22c:145 Artificial Intelligence, Fall’05 – p.18/

Ordering the Variables The order in which add the variables to the network is important.

JohnCalls MaryCalls^ Alarm^ Burglary^ Earthquake

MaryCalls JohnCalls^ Earthquake Burglary^ Alarm “Wrong” orderings produces more complex networks.

22c:145 Artificial Intelligence, Fall’05 – p.19/