














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















CSE 515 – Statistical Methods – Spring 2011 2
Course requirement
4 homework assignments (60% of final grade) Theory / implementation exercises First one goes out next Monday! 2 weeks to complete each HW problems are long and hard Please, please, please start early! Late/collaboration policies are described on the website
Final exam (35%) Date will be announced later.
Participation (5%)
CSE 515 – Statistical Methods – Spring 2011 3
Probabilistic graphical models (PGMs)
One of the most exciting developments in machine learning (knowledge representation, AI, EE, Stats, …) in the last two decades…
Tool for representing complex systems and performing sophisticated reasoning tasks
Why have a model? Compact and modular representation of complex systems Ability to efficiently execute complex reasoning tasks Make predictions Generalize from particular problem
CSE 515 – Statistical Methods – Spring 2011 4
A simple example
Variables Earthquake (E), Burglary (B), Alarm (A), NeighborCalls (N)
CSE 515 – Statistical Methods – Spring 2011 7
E B A N Prob. F F F F 0. F F F T 0. F F T F 0. F F T T 0. F T F F 0. F T F T 0. F T T F 0. F T T T 0. T F F F 0. T F F T 0. T F T F 0. T F T T 0. T T F F 0. T T F T 0. T T T F 0. T T T T 0.
24 -1 independent parameters
A simple example
CSE 515 – Statistical Methods – Spring 2011 8
A larm
N eighborCalls
E arthquake B urglary
A E B F T F F 0.99 0. F T 0.1 0. T F 0.3 0. T T 0.01 0.
N A F T F 0.9 0. T 0.2 0.
E F T 0.9 0.
8 independent parameters
B F T 0.7 0.
Representation: graph
Intuitive data structure
Reasoning
Probability theory
Example Bayesian network
The “Alarm” network for monitoring intensive care patients 37 variables 509 parameters (full joint 2^37 )
CSE 515 – Statistical Methods – Spring 2011 9
PCWP CO HRBP
HREKG HRSAT
HISTORY HR ERRCAUTER
CATECHOL
SAO2 EXPCO
ARTCO
VENTALV
VENTLUNG VENITUBE
DISCONNECT
MINVOLSET
PULMEMBOLUS INTUBATION KINKEDTUBE VENTMACH
PAP SHUNT
ANAPHYLAXIS
MINOVL
PVSAT
FIO PRESS
TPR INSUFFANESTH
LVFAILURE
LVEDVOLUME STROEVOLUME ERRBLOWOUTPUT
HYPOVOLEMIA
CVP
BP
Representation: graphs
Intuitive data structure for modeling highly-interacting sets of variables Compact representation Explicit model of modularity
Data structure that allows for design of efficient general- purpose algorithms
PCWP CO HRBP HREKG HRSAT
HISTORY HR ERRCAUTER
CATECHOL
SAO2 EXPCO
ARTCO
VENTALV
VENTLUNG VENITUBE
DISCONNECT
MINVOLSET PULMEMBOLUSINTUBATION KINKEDTUBE VENTMACH PAP SHUNT
ANAPHYLAXIS
MINOVL PVSAT
FIO2 PRESS
TPR INSUFFANESTH LVFAILURE LVEDVOLUME STROEVOLUME ERRBLOWOUTPUT
HYPOVOLEMIA
CVP BP
Course outline
Application:
recommendation systems
Given user preferences, suggest recommendations
Example: Amazon.com
Input: movie preferences of many users
Solution: model correlations between movie features Users that like comedy, often like drama Users that like action, often do not like cartoons Users that like Robert Deniro films often like Al Pacino films Given user preferences, can predict probability that new movies match preferences
CSE 515 – Statistical Methods – Spring 2011 14
Diagnostic systems
Diagnostic indexing for home health site at microsoft
Enter symptoms Æ recommend multimedia content
CSE 515 – Statistical Methods – Spring 2011 15
Full of tasks that require reasoning under uncertainty
Many research areas in CS
[Barnard et al]
[Guestrin et al]
[Friedman et al]
[Guestrin et al] [Fox et al]
Sample spaces, events and probabilities
Probability
Begin with a set Ω -- the sample space
A probability space is a sample space with an assignment P(α) for every α∈Ω s.t.
An event A is any subset of Ω
E.g., P(die roll<4) = P(1)+ P(2)+P(3) = 0.
CSE 515 – Statistical Methods – Spring 2011 19
Conditional probabilities
Consider two events α and β, e.g. α = getting admitted to the UW CSE, β = getting a job offer from Microsoft. After learning that α is true, how do we feel about β? P(β|α)
CSE 515 – Statistical Methods – Spring 2011 20
Two of the most important rules of
the quarter: 1. The chain rule
From the definition of the conditional distribution,
we immediately see that P(α∩β)=P(α)P(β|α)
More generally:
P(α 1 ∩…∩αk)= P(α 1 ) P(α 2 |α 1 )···P(αk|α 1 ∩…∩αk-1 )
CSE 515 – Statistical Methods – Spring 2011 21
Two of the most important rules of
the quarter: 2. Bayes rule
Another immediate consequence of the definition of conditional probability is:
A more general version of Bayes’ rule, where all the probabilities are conditioned on some “background” event γ:
CSE 515 – Statistical Methods – Spring 2011 22
Random variables
Probability distributions are defined for events
Events are complicated – so, let’s think about attributes Age, Grade, HairColor
A random variable (such asGrade), is defined by a function that associates each outcome in Ω (each person) with a value. Grade = A – shorthand for event {w∈Ω:fGrade(w)=A} Grade = B – shorthand for event { w∈Ω:fGrade(w)=B} :
Properties of a random variable X:
CSE 515 – Statistical Methods – Spring 2011 25
Basic concepts for random variables
Atomic event: assignment x 1 ,…,xn to X 1 ,…,Xn
Conditional probability: P(Y|X)=P(X,Y)/P(X) For all values x∈Val(X), y∈Val(Y)
Bayes rule: P(X|Y)=
Chain rule: P(X 1 ,…,Xn) =
CSE 515 – Statistical Methods – Spring 2011 26
Joint distribution, marginalization
Two random variables – Grade & Intelligence
Marginalization – Compute marginal over single variable
CSE 515 – Statistical Methods – Spring 2011 27
Marginalization – the general case
Compute marginal distribution P(Xi ) from joint distribution P(X 1 ,…, Xi ,…,Xn) :
CSE 515 – Statistical Methods – Spring 2011 28
Independent random variables
If X 1 ,…,Xn are independent then: P(X 1 ,…,Xn) = P(X 1 )…P(Xn) O(n) parameters All 2n^ probabilities are implicitly defined Cannot represent many types of distributions
X and Y are conditionally independent given Z if P(X=x|Y=y, Z=z) = P(X=x|Z=z) for all values x, y, z Equivalently, if we know Z, then knowing Y does not change predictions of X Notation: (X ⊥ Y | Z)
CSE 515 – Statistical Methods – Spring 2011 31
Conditional parameterization
S = SAT score, Val(S) = {s^0 ,s^1 }
I = Intelligence, Val(I) = {i^0 ,i 1 }
I S P(I,S) i 0 s^0 0. i 0 s^1 0. i 1 s^0 0. i 1 s^1 0.
S I s^0 s^1 i 0 0.95 0. i 1 0.2 0.
I i 0 i 1 0.7 0.
P(I,S) P(I) P(S|I)
Joint parameterization Conditional parameterization
3 parameters 3 parameters
Alternative parameterization: P(S) and P(I|S)
CSE 515 – Statistical Methods – Spring 2011 32
Conditional parameterization
S = SAT score, Val(S) = {s^0 ,s 1 }
I = Intelligence, Val(I) = {i^0 ,i^1 }
G = Grade, Val(G) = {g^0 ,g 1 ,g 2 }
Assume that G and S are independent given I
CSE 515 – Statistical Methods – Spring 2011 33
Joint parameterization
Conditional parameterization has
Naïve Bayes model
CSE 515 – Statistical Methods – Spring 2011 34
Class variable C, Val(C) = {c 1 ,…,ck}
Evidence variables X 1 ,…,Xn
Naïve Bayes assumption: evidence variables
are conditionally independent given C
Applications in medical diagnosis, text classification
Used as a classifier:
Problem: Double counting correlated evidence
=
n
i
P C X Xn PC P Xi C 1
( , 1 ,..., ) ( ) ( | )
∏ = =
=
= n i (^) i
i n
n Px C c
Px C c PC c
PC c PC c x x
PC c x x (^1 )
( | )
( | ) ( )
( ) ( | ,..., )
( | ,..., )
Bayesian network structure
Directed acyclic graph G Nodes X 1 ,…,Xn represent random variables
G encodes local Markov assumptions Xi is independent of its non-descendants given its parents Formally: (Xi ⊥ NonDesc(X (^) i) | Pa(Xi)) A
B C
E
G
E ⊥ {A,C,D,F} | B D F
CSE 515 – Statistical Methods – Spring 2011 37
Independency mappings (I-maps)
Let P be a distribution over X
Let I(P) be the independencies ( X ⊥ Y | Z ) in P
A Bayesian network structure is an I-map (independency mapping) of P if I(G)⊆I(P)
I
S
I S P(I,S) i 0 s^0 0. i 0 s^1 0. i 1 s^0 0. i 1 s^1 0.
I
S
I S P(I,S) i 0 s^0 0. i 0 s^1 0. i 1 s^0 0. i 1 s^1 0.
I(G)={I⊥S} I(P)={I⊥S} I(P)=∅ I(G)=∅
CSE 515 – Statistical Methods – Spring 2011 38
Factorization Theorem
If G is an I-Map of P, then P factorizes over G.
Proof: wlog. (without loss of generality) X 1 ,…,Xn is an ordering consistent withG By chain rule:
From assumption:
Since G is an I-Map Æ (Xi; NonDesc(Xi)| Pa(Xi))∈I(P)
=
n
i
P X Xn PXi PaXi 1
( 1 ,..., ) ( | ( ))
{ , } ( ) ( )
( ) { , }
X X Pa X NonDesc X
Pa X X X
− ⊆
⊆
K
K
= −
n
i
P X Xn P Xi X Xi 1
( 1 ,..., ) ( | 1 ,..., 1 )
P ( Xi | X 1 ,..., Xi − 1 )= P ( Xi | Pa ( Xi )) CSE 515 – Statistical Methods – Spring 2011 39
Factorization implies I-Map
CSE 515 – Statistical Methods – Spring 2011 40
Æ G is an I-Map of P
Proof:
Need to show (Xi ; NonDesc(Xi )| Pa(X (^) i ))∈I(P) or that
P(Xi | NonDesc(X (^) i )) = P(Xi | Pa(X (^) i ))
wlog.X 1 ,…,Xn is an ordering consistent withG
=
n
i
P X Xn PXi Pa Xi 1
( 1 ,..., ) ( | ( ))
( | ( ))
( | ( ))
( | ( ))
( ( ))
( , ( )) ( | ( ))
1
1
1
i i
i
k
k k
i
k
k k
i
i i i i
PX PaX
PX Pa X
PX Pa X
PNonDescX
PX NonDescX PX NonDescX
=
=
=
∏
∏ −
=
=