13.Uncertainty
13.Uncertainty
13.Uncertainty
Jihoon Yang
AI Slides (6e)
Jihoon !c Lin (ML
Yang Zuoquan@PKU 1998-2020
Research Lab) Uncertainty 9 644 2 / 31
Making decisions
Making under uncertainty
decisions under uncertai
Suppose I believe the following:
Random variables
A random variable is a function from sample points to some range,
e.g., the reals or Booleans (e.g. Odd(1) = true)
P (X = xi ) = ⌃{!:X(!) = x }P (!)
i
e.g., P (Odd = true) = P (1) + P (3) + P (5) = 1/6 + 1/6 + 1/6 = 1/2
A A B B
>
Toothache = Toothache =
true false
Cavity = true 0. 4 0.1
Cavity = false 0.1 0.4
P (a ^ b)
P (a|b) = if P (b) 6= 0
P (b)
L
catch catch catch catch
L
L
cavity .108 .012 .072 .008
cavity .016 .064 .144 .576
L
Jihoon
AI Yang
Slides (6e)!c Lin(ML Research1998-2020
Zuoquan@PKU Lab) Uncertainty 9 659 13 / 31
Inference by Enumeration
Inference by enumeration
Start with the joint distribution
toothache toothache
L
catch catch catch catch
L
cavity .108 .012 .072 .008
cavity .016 .064 .144 .576
L
L
catch catch catch catch
L
cavity .108 .012 .072 .008
cavity .016 .064 .144 .576
L
L
catch catch catch catch
L
cavity .108 .012 .072 .008
cavity .016 .064 .144 .576
L
toothache ¬toothache
catch ¬catch catch ¬catch
cavity .108 .012 .072 .008
¬cavity .016 .064 .144 .576
• Obvious problems:
n
– Worst-case time complexity O ( d ) where d is the largest arity
partment of Computer Science & Engineering n
– Space
chine Learning complexity O(d ) to store the joint distribution
Research Laboratory 25
n
– How to find the numbers for O ( d ) entries??
Jihoon Yang (ML Research Lab) Uncertainty 19 / 31
Independence
Independence
Toothache
Toothache decomposes into
Catch Cavity
Catch Cavity
Weather
Weather
• Conditional independence
– Often reduces the size of the representation of the joint
distribution from exponential in n to linear in n
– Is one of the most basic and robust form of knowledge about
uncertain environments
that is, if
( xi , y j , z k ) P( X xi | Y yj,Z zk ) P( X xi | Z zk )
P (b|a)P (a)
) Bayes’ rule P (a|b) =
P (b)
or in distribution form
P(X|Y )P(Y )
P(Y |X) = = ↵P(X|Y )P(Y )
P(X)
Cavity Cause
Jihoon
partment Yang (ML
of Computer Research
Science Lab)
& Engineering Uncertainty 25 / 31
Example: Wumpus World
Example: Wumpus World
1,4 2,4 3,4 4,4
!
P(P1,3|known, b) = α P(P1,3, unknown, known, b)
unknown
!
= α P(b|P1,3, known, unknown)P(P1,3, known, unknown)
unknown
! !
= α P(b|known, P1,3, f ringe, other)P(P1,3, known, f ringe, other)
f ringe other
! !
= α P(b|known, P1,3, f ringe)P(P1,3, known, f ringe, other)
f ringe other
! !
= α P(b|known, P1,3, f ringe) P(P1,3, known, f ringe, other)
f ringe other
! !
= α P(b|known, P1,3, f ringe) P(P1,3)P (known)P (f ringe)P (other)
f ringe other
! !
= α P (known)P(P1,3) P(b|known, P1,3, f ringe)P (f ringe) P (other)
f ringe other
!
= α! P(P1,3) P(b|known, P1,3, f ringe)P (f ringe)
f ringe
1,2 2,2 1,2 2,2 1,2 2,2 1,2 2,2 1,2 2,2
B B B B B
OK OK OK OK OK
1,1 2,1 3,1 1,1 2,1 3,1 1,1 2,1 3,1 1,1 2,1 3,1 1,1 2,1 3,1
B B B B B
OK OK OK OK OK OK OK OK OK OK
0.2 x 0.2 = 0.04 0.2 x 0.8 = 0.16 0.8 x 0.2 = 0.16 0.2 x 0.2 = 0.04 0.2 x 0.8 = 0.16