Docsity

Computing having networks, Schemes and Mind Maps of Applied Computing

Toggle sidebar
bg1
1
Lecture 1 – Mar 28, 2011
CSE 515, Statistical Methods, Spring 2011
Instructor: Su-In Lee
University of Washington, Seattle
Introduction to
Probabilistic Graphical Models
Readings: K&F 2.1, 2.2, 2.3, 3.1
Logistics
Teaching Staff
Instructor: Su-In Lee ([email protected], PAC 536)
Office hours: Fri 9-10am or by appointment (PAC 536)
TA: Andrew Guillory ([email protected])
Office hours: Wed 1:30-2:20 pm or by appointment (PAC 216)
Course website
cs.washington.edu/515
Discussion group: course website
Textbook
(required) Daphne Koller and Nir Friedman, Probabilistic
Graphical Models: Principles and Techniques, MIT Press
Various research papers (copies available in class)
CSE 515 – Statistical Methods – Spring 2011 2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Computing having networks and more Schemes and Mind Maps Applied Computing in PDF only on Docsity!

Lecture 1 – Mar 28, 2011

CSE 515, Statistical Methods, Spring 2011

Instructor: Su-In Lee

University of Washington, Seattle

Introduction to

Probabilistic Graphical Models

Readings: K&F 2.1, 2.2, 2.3, 3.

Logistics

„ Teaching Staff

„ Instructor: Su-In Lee ([email protected], PAC 536)

„ Office hours: Fri 9-10am or by appointment (PAC 536)

„ TA: Andrew Guillory ([email protected])

„ Office hours: Wed 1:30-2:20 pm or by appointment (PAC 216)

„ Course website

„ cs.washington.edu/

„ Discussion group: course website

„ Textbook

„ (required) Daphne Koller and Nir Friedman, Probabilistic

Graphical Models: Principles and Techniques, MIT Press

„ Various research papers (copies available in class)

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

Probabilistic Inference

Task I Say that the alarm is set off (A=True), then how likely is it to get

a call from our neighbor (N=True)?

Task II Given that my neighbor calls (N=True), how likely it is that a

burglary occurred (B=True)?

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

Week Topic Reading

1 Introduction, Bayesian network representation 2.1-3, 3.

Bayesian network representation cont. 3.1-

2 Local probability models 5

Undirected graphical models 4

3 Exact inference 9.1-

Exact inference cont. 10.1-

4 Approximate inference 12.1-

Approximate inference cont. 12.1-

5 Parameter estimation 17

Parameter estimation cont. 17

6 Partially observed data (EM algorithm) 19.1-

Structure learning BNs 18

7 Structure learning BNs cont. 18

Partially observed data 19.4-

8 Learning undirected graphical models 20.1-

Learning undirected graphical models cont. 20.1-

9 Hidden Markov Models TBD

HMMs cont. and Kalman filter TBD

10 Markov decision processes TBD

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

Speech recognition

planning under uncertainty

computer vision

[Barnard et al]

[Guestrin et al]

evolutionary biology

[Friedman et al]

medical diagnosis

Modeling sensor data

[Guestrin et al] [Fox et al]

Tracking and robot localization

HMM

Kalman filter

Bayesian network

Undirected

graphical model

Dynamic Bayesian network

Sample spaces, events and probabilities

„ Probability

„ A degree of confidence that an “event” of an uncertain nature will occur.

„ Begin with a set Ω -- the sample space

„ Space of possible outcomes

„ e.g. if we consider dice, we might have a set Ω={1,2,3,4,5,6}

„ α∈Ω is a sample point / atomic event.

„ A probability space is a sample space with an assignment P(α) for every α∈Ω s.t.

„ 0 ≤P(α)≤ 1

„ ∑α P(α)=

„ e.g. P(1)= P(2)= P(3)= P(4)= P(5) = P(6)=1/

„ An event A is any subset of Ω

„ P(A) = ∑{α ∈ A}P(α)

„ 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:

„ Val(X) = a set of possible values of random variable X

„ For discrete (categorical): ∑i=1,…,|Val(X)| P(X=xi) = 1

„ P(x)≥ 0

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

„ 2 ⋅ 2 ⋅3=12-1=11 independent parameters

„ Conditional parameterization has

„ P(I,S,G) = P(I)P(S|I)P(G|I,S) = P(I)P(S|I)P(G|I)

„ P(I) – 1 independent parameter

„ P(S|I) – 2⋅1 independent parameters

„ P(G|I) - 2⋅2 independent parameters

„ 7 independent parameters

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 ,..., ) ( | ( ))

{ , } ( ) ( )

( ) { , }

i i i

i i

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

=

=

=

∏

∏ −

=

=