Introduction to Bayesian Networks - Horvath Lab UCLA

34
Introduction to Bayesian Networks Jun Zhu, Ph. D. Department of Genomics and Genetic Sciences Icahn Institute of Genomics and Multiscale Biology Icahn Medical School at Mount Sinai New York, NY @IcahnInstitute UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Transcript of Introduction to Bayesian Networks - Horvath Lab UCLA

Page 1: Introduction to Bayesian Networks - Horvath Lab UCLA

Introduction to Bayesian Networks

Jun Zhu, Ph. D.

Department of Genomics and Genetic Sciences

Icahn Institute of Genomics and Multiscale

Biology

Icahn Medical School at Mount Sinai

New York, NY

@IcahnInstitute UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 2: Introduction to Bayesian Networks - Horvath Lab UCLA

Outline

1. What are Bayesian networks?

2. What are usages of Bayesian networks?

3. What is a naïve Bayes net?

4. How to train a Bayesian network?

5. How to construct a Bayesian network?

6. What is different in biology system for BN?

7. What is Dynamic BN?

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 3: Introduction to Bayesian Networks - Horvath Lab UCLA

What are Bayesian networks?

• A Bayesian network is an expert system that captures all existing knowledge;

• They are also called belief networks, Bayesian belief networks, causal probabilistic networks;

• A Bayesian network consists of

• a directed acyclic graph (a set of nodes and directed edges connecting

nodes)--DAG

• A set of conditional probability tables (for discrete data) or probability

density functions (for continuous data)

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 4: Introduction to Bayesian Networks - Horvath Lab UCLA

A Bayesian network

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

C

A B

F

D

( | , )p C A B

(D | )p B

E (E | )p B

(F | C)p

DAG Conditional

probability tables

Page 5: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• A tree is a Bayesian network

C

A

B

F

D E

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 6: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

C

A B

F

D E

• A Bayesian network is not a tree

Page 7: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

• Conventional Notations

( ) ( | ( ))i i

i

p p A pa AA

1 2 n{A ,A , ,A } are nodes.A

( ) is the joint probability of nodes .p A A

( ) are parent nodesof .i ipa A A

Page 8: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

C B

A

D E

• A diverging structure

out-degree =4

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 9: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

D

A B C

• A converging structure

in-degree =3

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 10: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Why a DAG is required?

( ) ( | ( ))i i

i

p p A pa AA

• It is guaranteed that there is a node Aj in a DAG that

has no child.

j

j

j

( ) ( \ { }) ( | \ { })

( \ { }) ( | ( ))

( ( | ( )))* ( | ( ))

j j

j j

i i j

i j

p p A p A A

p A p A pa A

p A pa A p A pa A

A A A

A

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 11: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network: usages

• Bayesian networks can be used to predict outcomes or diagnose causal effects (if structures are known)

• Bayesian networks can be used to discover causal relationships (if structures are not known)

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 12: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network: an example

Alarm

burglar Earthquake

Phonecall

Radio Internet

• A burglar alarm system

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 13: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network: a classifier

• What is a naïve Bayes net

C B

A

D E

(

(( | , , )

(

p A,B,C,D,E)= p(B | A)p(C | A)p(D | A)p(E | A)

p A,B,C,D,E)p A B C D

p B,C,D,E)

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 14: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

B

A

C

• How to train a Bayesian network

A=a1 A=a2 A=a3

B=b1 7 12 25

B=b2 20 30 28

B=b3 25 20 6

A=a1 A=a2 A=a3

C=c1 15 8 20

C=c2 11 25 18

C=c3 27 10 16

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 15: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

B

A

C

• How to construct a Bayesian network? Enumerating

possible structures

B

A

C B

A

C B

A

C

B

A

C B

A

C B

A

C

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 16: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? Enumerating all

possible structures is impossible

,NN N is thenumberof nodes

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 17: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? Heuristic approach

xi

Pa1 Pa2 Pan

xi

Pa1 Pa2 Pan

xi

Pa1 Pa2 Pan

xi

Pa1 Pa2 Pan

X Pan+1 Paj

a b c

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 18: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? Heuristic approach

D

A B

Parameters to estimate=3x3x3

D

A B C

Parameters to estimate=3x3x3x3

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 19: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? Heuristic approach

( | ) ( )( | )

( )

p D M p Mp M D

p D

ˆ2ln( ( | )) BIC 2ln( ) ln( )

: number of samples

: number of parameters toestimate

p M D D | M k n

n

k

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 20: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? averaging

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Zhu et al., PLoS CompBio, 2007

Zhu et al., Nature Genetics, 2008

Page 21: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network • How to construct a Bayesian network? Enforcing DAG

after averaging

1. Calculate shortest distance

2. Identify loops

3. Remove the weakest link in a loop

4. Go to step 1

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Zhu et al., PLoS CompBio, 2007

Page 22: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• How to construct a Bayesian network? Upper limit on

in-degree

Parameters to estimate=

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

xi

Pa1 Pa2 Pan

13n

Page 23: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Continuous vs discrete models

• Discrete model is faster, easier to capture high order

interactions

• Any discretization lost information

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 24: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Missing information

B

A

C B

X

C

A

B

X

C

A

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 25: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network • Feedbacks in biological systems

( , )

( , )

n

n n

dgg g c

dt c

dcg c v g c

dt

UCLA workshop, July, 2013---Jun Zhu, Ph. D. Chen et al., Nature, 2008

Page 26: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Feedbacks in biological systems

Changing parameters in activation results in

negative correlation.

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 27: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Feedbacks in biological systems

Changing parameters in inhibition results in

positive correlation.

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 28: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Biological network is context specific

• Bayesian network is just a snapshot under a specific

condition

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 29: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Dynamic Bayesian Bayesian network?

Granger causality Dynamic Bayesian network

Zhu et al., PLoS CompBio, 2010

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 30: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Granger’s causality test

, , 1 ,

, , 1 , 1 ,

n t n n t n t

n t n n t n n t n t

y y

y y x

Zhu et al., PLoS CompBio, 2010

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 31: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

• Dynamic Bayesian network

Zhu et al., PLoS CompBio, 2010

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

1

1

( , , ) ( | Pa( ))T

i i

T t t

t i

p X X p X X

1Pa( )i

t t tX X X

Page 32: Introduction to Bayesian Networks - Horvath Lab UCLA

Bayesian network

Dynamic Bayesian network: Assumptions

1. Sampling time is faster than reaction time

2. Sampling time is the exact same as the reaction time

3. Sample time is slower than reaction time

Zhu et al., PLoS CompBio, 2010

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Page 33: Introduction to Bayesian Networks - Horvath Lab UCLA

Aknowledgements

UCLA workshop, July, 2013---Jun Zhu, Ph. D.

Sage Bionetworks

Stephen Friend et al.

Mount Sinai

Eric Schadt

Bin Zhang

Zhidong Tu

Decode

Valur Emilsson

U Washington

Roger Baumgarner

UCLA

Jake Lusis

Xia Yang, et al

Berkerley

Rachel Brem

Princeton

Lenoid Kruglyak

Harvard

Jun Liu

Merck

Qiuwei Xu

Ethan Xu

Theretha Zhang

Fred Hutchingson

Paddison lab

MD Anderson

Hanash lab

U Wisconsin

Alan Attie

Mark Keller, et al

Mount Sinai

Powell lab

Oh Lab

Casaccia

Page 34: Introduction to Bayesian Networks - Horvath Lab UCLA

Aknowledgements

• Icahn Institute of Genomics and Multiscale Biology, Icahn Medical School at Mount Sinai

• Canary Foundation

• Prostate Cancer Foundation

• NIH

• NCI

UCLA workshop, July, 2013---Jun Zhu, Ph. D.