Docsity

Probability Distributions: Markov Independencies and I-Maps - Prof. Lise Getoor, Study notes of Computer Science

Toggle sidebar
bg1
1
cmsc726: Graphical
Models
material from: Michael Jordan, Nir Friedman and Daphne Koller
Describing Data
• The canonical descriptive strategy is to describe the d ata in terms of
their underlying distribution
• As usual, we have a p-dimensional data matrix with variables X1, …, Xp
– A variable describes sets of collectively mutually exclusive events, i.e. not
two variables for HasDiease and Healthy
– Variable represents a value, not a probability, i.e., Smoker, not Chance of
Smoker
– Clarity Test: knowable in principle, Gas Price: cents per gallonversus cheap,
expensive (unless cheap and expensive are defined precisely in terms of
price)
• The joint distribution is P(X1, …, Xp)
• The joint gives us complete information about the variables
• Given the joint distribution, we can answer any question about the
relationships among any subset of variables
– are X2 and X5 independent?
– What is the most likely value for disease, given test1 is positive?
– If I want to determine whether someone has disease 1, what test will give
me the most information?
Graphical Models
• In the next 3-4 lectures, we will be studying
graphical models
• e.g. Bayesian networks, Bayes nets, Belief nets,
Markov networks, etc.
• We will study:
–representation
– reasoning
–learning
• Materials based on upcoming books by Nir Friedman
and Daphne Koller and Michael Jordan.
Probability Distributions
•Let X
1,…,Xpbe random variables
• Let P be a joint distribution over X1,…,Xp
If the variables are binary, # of parameters?
we need O(2p) parameters to describe P
Can we do better?
•Key idea: use properties of independence
Independent Random Variables
•X is independent Y if
– P(X = x|Y = y) = P(X = x) for all values x,y
– That is, learning the values of Y does not change prediction
of X
• If X and Y are independent then
– P(X,Y) = ?
• P(X,Y) = P(X|Y)P(Y) = P(X)P(Y)
• In general, if X1,…,Xpare independent, then
–P(X
1,…,Xp)=?
•P(X
1)...P(Xp)
– # of paramters?
• O(n) parameters
Conditional Independence
• Unfortunately, most of random variables of interest
are not independent of each other
• A more suitable notion is that of conditional
independence
• Two variables 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
– That is, learning the values of Y does not change prediction of X
once we know the value of Z
– notation: I ( X , Y | Z )
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Probability Distributions: Markov Independencies and I-Maps - Prof. Lise Getoor and more Study notes Computer Science in PDF only on Docsity!

cmsc726: Graphical

Models

material from: Michael Jordan, Nir Friedman and Daphne Koller

Describing Data

  • The canonical descriptive strategy is to describe the data in terms of their underlying distribution
  • As usual, we have a p-dimensional data matrix with variables X 1 , …, Xp
    • A variable describes sets of collectively mutually exclusive events, i.e. not two variables for HasDiease and Healthy
    • Variable represents a value, not a probability, i.e., Smoker, not Chance of Smoker
    • Clarity Test: knowable in principle, Gas Price: cents per gallon versus cheap, expensive (unless cheap and expensive are defined precisely in terms of price)
  • The joint distribution is P(X 1 , …, Xp)
  • The joint gives us complete information about the variables
  • Given the joint distribution, we can answer any question about the relationships among any subset of variables - are X2 and X5 independent? - What is the most likely value for disease, given test1 is positive? - If I want to determine whether someone has disease 1, what test will give me the most information?

Graphical Models

  • In the next 3-4 lectures, we will be studying graphical models
  • e.g. Bayesian networks, Bayes nets, Belief nets, Markov networks, etc.
  • We will study:
    • representation
    • reasoning
    • learning
  • Materials based on upcoming books by Nir Friedman and Daphne Koller and Michael Jordan.

Probability Distributions

  • Let X 1 ,…,X (^) p be random variables
  • Let P be a joint distribution over X 1 ,…,Xp

If the variables are binary, # of parameters? we need O(2p^ ) parameters to describe P

Can we do better?

  • Key idea : use properties of independence

Independent Random Variables

  • X is independent Y if
    • P(X = x|Y = y) = P(X = x) for all values x,y
    • That is, learning the values of Y does not change prediction of X
  • If X and Y are independent then
    • P(X,Y) =?
      • P(X,Y) = P(X|Y)P(Y) = P(X)P(Y)
  • In general, if X 1 ,…,Xp are independent, then
    • P(X 1 ,…,Xp)=?
      • P(X 1 )...P(Xp)
    • of paramters?

      • O(n) parameters

Conditional Independence

  • Unfortunately, most of random variables of interest are not independent of each other
  • A more suitable notion is that of conditional independence
  • Two variables 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
  • That is, learning the values of Y does not change prediction of X once we know the value of Z
  • notation: I ( X , Y | Z )

Example: Naïve Bayesian Model

  • A common model in early diagnosis:
    • Symptoms are conditionally independent given the disease (or fault)
  • Thus, if
    • X 1 ,…,X (^) p denote whether the symptoms exhibited by the patient (headache, high-fever, etc.) and
    • H denotes the hypothesis about the patients health
  • then, P(X 1 ,…,Xp ,H) = P(H)P(X 1 |H)…P(Xp|H),
  • This naïve Bayesian model allows compact representation - It does embody strong independence assumptions

Modeling assumptions: Ancestors can effect descendants' genotype only by passing genetic materials through intermediate generations

Example: Family trees

Noisy stochastic process:

Example: Pedigree

  • A node represents an individual’s genotype

Homer

Bart

Marge

Lisa Maggie

Markov Assumption

  • We now make this independence assumption more precise for directed acyclic graphs (DAGs)
  • Each random variable X, is independent of its non- descendents, given its parents Pa(X)
  • Formally, I (X, NonDesc(X) | Pa(X))

Descendent

Ancestor

Parent

Non-descendent

X

Y 1 Y 2

Non-descendent

Markov Assumption Example

  • In this example:
    • I ( E, B )
    • I ( B, {E, R} )
    • I ( R, {A, B, C} | E )
    • I ( A, R | B,E )
    • I ( C, {B, E, R} | A)

Earthquake

Radio

Burglary

Alarm

Call

I-Maps

  • A DAG G is an I-Map of a distribution P if the all Markov assumptions implied by G are satisfied by P (Assuming G and P both use the same set of random variables) Examples:

X Y

x y P(x,y) 0 0 0. 0 1 0. 1 0 0. 1 1 0.

X Y

x y P(x,y) 0 0 0. 0 1 0. 1 0 0. 1 1 0.

Factorization

  • Given that G is an I-Map of P, can we simplify the representation of P?
  • Example:
  • Since I(X,Y), we have that P(X|Y) = P(X)
  • Applying the chain rule

P(X,Y) = P(X|Y) P(Y) = P(X) P(Y)

  • Thus, we have a simpler representation of P(X,Y)

X Y

d-seperation

  • A procedured-sep(X; Y | Z, G) that given a DAGG,

and setsX, Y, andZ returns eitheryes orno

  • Goal : d-sep(X; Y | Z, G) = yes iffI(X;Y|Z) follows fromMarkov(G)

Paths

  • Intuition: dependency must “flow” along paths in the graph
  • A path is a sequence of neighboring variables

Examples:

  • R ← E → A ← B
  • C ← A ← E → R

Earthquake

Radio

Burglary

Alarm

Call

Paths

  • We want to know when a path is
    • active -- creates dependency between end nodes
    • blocked -- cannot create dependency end nodes
  • We want to classify situations in which paths are active.

Blocked Unblocked

E

R A

E

R A

Path Blockage

Three cases:

  • Common cause

Blocked Active

Blocked (^) Unblocked E

C

A

E

C

A

Path Blockage

Three cases:

  • Common cause
  • Intermediate cause

Blocked (^) Active Blocked (^) Unblocked

E B

A

C

E B

A

C

E B

A

C

Path Blockage

Three cases:

  • Common cause
  • Intermediate cause
  • Common Effect

Blocked (^) Active

Path Blockage -- General Case

A path is active, given evidence Z , if

  • Whenever we have the configuration

B or one of its descendents are in Z

  • No other nodes in the path are in Z

A path is blocked, given evidence Z , if it is not active.

A C

B

A

  • Blocked R,B)?

Example

E B

C

R

  • Blocked (R,B) = yes
  • Blcoked (R,B|A)?

Example

E B

A

C

R

  • Blocked (R,B) = yes
  • Blocked (R,B|A) = no
  • Blocked (R,B|E,A)?

Example

E B

A

C

R

  • Blocked (R,B) = yes
  • Blocked (R,B|A) = no
  • Blocked (R,B|E,A)? = yes

Example

E B

A

C

R

d-Separation

  • X is d-separated from Y , given Z , if all paths from a

node in X to a node in Y are blocked, given Z.

  • Checking d-separation can be done efficiently (linear time in number of edges) - Bottom-up phase: Mark all nodes whose descendents are in Z - X to Y phase: Traverse (BFS) all edges on paths from X to Y and check if they are blocked

Non-uniqueness of minimal I-Map

  • Unfortunately, there may be several minimal I-Maps for the same distribution - Applying I-Map construction procedure with different orders can lead to different structures

E B

A

C

R

Original I-Map

E B

A

C

R

Order: C, R, A, E, B

Choosing Ordering & Causality

  • The choice of order can have drastic impact on the complexity of minimal I-Map
  • Heuristic argument: construct I-Map using causal ordering among variables
  • Justification?
    • It is often reasonable to assume that graphs of causal influence should satisfy the Markov properties.

P-Maps

  • A DAGG is P-Map ( perfect map ) of a distributionP if - I(X; Y | Z) if and only if d-sep(X; Y |Z, G) = yes

Notes:

  • A P-Map captures all the independencies in the distribution
  • P-Maps are unique, up to DAG equivalence

Unfortunately, some distributions do not have a P-Map /

Bayesian Networks

  • A Bayesian network specifies a probability distribution via two components:

– A DAGG

  • A collection of conditional probability distributionsP(X (^) i|Pai)
  • The joint distribution P is defined by the factorization
  • Additional requirement:G is a minimal I-Map ofP

= ∏ i

P (X 1 ,...,Xn) P(Xi|Pai)

DAG Summary

  • We explored DAGs as a representation of conditional independencies: - Markov independencies of a DAG - Tight correspondence betweenMarkov(G) and the factorization defined byG - d-separation, a sound & complete procedure for computing the consequences of the independencies - Notion of minimal I-Map - P-Maps
  • This theory is the basis for defining Bayesian networks

CPDs

  • So far, we focused on how to represent independencies using DAGs
  • The “other” component of a Bayesian networks is the specification of the conditional probability distributions (CPDs)
  • We start with the simplest representation of CPDs and then discuss additional structure

Tabular CPDs

  • When the variables of interest are all discrete, the common representation is as a table:
  • For example P(C|A,B) can be represented by

A B P(C = 0 | A, B) P(C = 1 | A, B)

Tabular CPDs

Pros:

  • Very flexible, can capture any CPD of discrete variables
  • Can be easily stored and manipulated

Cons:

  • Representation size grows exponentially with the number of parents!
  • Unwieldy to assess probabilities for more than few parents

Structured CPD

  • To avoid the exponential blowup in representation, we need to focus on specialized types of CPDs
  • This comes at a cost in terms of expressive power
  • There are several types of structured CPDs
    • See BNB ch. 4 for details (not required)
    • Noisy-Or
    • Mixed Continuous and Discrete

Causal Independence

  • Consider the following situation
  • In tabular CPD, we need to assess the probability of fever in eight cases
  • These involve all possible interactions between diseases
  • For three disease, this might be feasible…. For ten diseases, not likely….

Disease 1 Disease 2 Disease 3

Fever

Causal Independence

  • Simplifying assumption:
    • Each disease attempts to cause fever, independently of the other diseases
    • The patient has fever if one of the diseases “succeeds”
  • We can model this using a Bayesian network fragment

Fever

Fever 1 Fever 2 Fever 3

Disease 1 Disease 2 Disease 3

OR gate

F = or(SF,F1,F2,F3)

Hypothetical variables “Fever caused by Disease i”

Spontenuous Fever

Noisy-Or CPD

  • Models P(X|Y 1 ,…,Y (^) k ), X, Y 1 ,…, Yk are all binary
  • Parameters:
  • pi -- probability of X = 1 due to Yi = 1
  • p 0 -- probability of X = 1 due to other causes
  • Plugging these in the model we get

P ( X = 1 | Y 1 ,..., Yk )= 1 − P ( X = 0 | Y 1 ,..., Yk )

− (^) ∏ − i

Y i ( 1 p ) ( 1 p ) i P ( X = 0 | Y 1 ,..., Yk ) = 0

Mixed Discrete and Continuous Conditional Gaussian CPDs

  • A model for networks that combine discrete and continuous variables
  • If X is continuous
    • Y 1 ,…,Yk are continuous
    • Z 1 ,…,Zl are discrete

Conditional Gaussian (CG) CPD:

  • For each joint value of Z 1 ,…,Zl define a different linear- Gaussian parameters
  • Resulting multivariate distribution: mixture of multivariate Gaussians - Each assignment of values to discrete variables selects a multivariate Gaussian over continuous variables

CPD Summary

  • Many choices for representing CPDs
  • Any “statistical” model of conditional distribution can be used - e.g., any regression model
  • Representing structure in CPDs can have implications on independencies among variables