Review Model I Model II Model III

Size: px
Start display at page:

Download "Review Model I Model II Model III"

Transcription

1 Maximum Likelihood Estimation & Expectation Maximization Lectures 3 Oct 5, 2011 CSE 527 Computational Biology, Fall 2011 Instructor: Su-In Lee TA: Christopher Miles Monday & Wednesday 12:00-1:20 Johnson Hall (JHN) Review Model I Model II Model III A A A OR? B C B C B C Exp 1 Exp 2 Gene A Exp N N instances Gene B Gene C Model selection: argmax x P(model x is true Data) How to compute P(model x is true Data)? Compute P( Data model x is true ) Use Bayes rule 2 1

2 Computing P(Data model II is true) Model II A P(A,B,C model II is true)=? P(A)P(B A)P(C A) P(A=high)P(B=low A=high) P(C=low A=high) B C Sample i Sample 1 Gene A Gene B Gene C Sample N 3 Outline Probabilistic models in biology Model selection problem Mathematical foundations Bayesian networks Learning from data Maximum likelihood estimation Maximum a posteriori (MAP) Expectation and maximization 4 2

3 Parameter Estimation Assumptions Fixed network structure Fully observed instances of the network variables: D={d[1],,d[M]} Maximum likelihood estimation (MLE)! Parameters of the Bayesian network For example, {i0,d1,g1,l0,s0} from Koller & Friedman 5 The Thumbtack example Parameter learning for a single variable. Variable X: an outcome of a thumbtack toss Val(X) = {head, tail} X Data A set of thumbtack tosses: x[1], x[m] 6 3

4 Maximum likelihood estimation Say that P(x=head) = Θ, P(x=tail) = 1-Θ P(HHTTHHH <M h heads, M t tails>; Θ) = Definition: The likelihood function L(Θ : D) = P(D; Θ) Maximum likelihood estimation (MLE) Given data D=HHTTHHH <M h heads, M t tails>, find Θ that maximizes the likelihood function L(Θ : D). 7 Likelihood function 8 4

5 MLE for the Thumbtack problem Given data D=HHTTHHH <M h heads, M t tails>, MLE solution Θ* = M h / (M h +M t ). Proof: 9 Continuous Space Assuming sample x 1, x 2,, x n is from a parametric distribution f (x Θ), estimate Θ. Say that the n samples are from a normal distribution with mean μ and variance σ 2. Probability density function 10 5

6 Continuous Space (cont.) Let Θ 1 =μ, Θ 2 = σ 2 1 L, : x, x,..., x ( n log L(, 2 : x1, x2,..., x 1 n log L( 1, 2 : x1, x2,..., x n ) ) ) log L( 1, 2 : x1, x2,..., 2 x n ) 11 Any Drawback? Is it biased? Is it? Yes. As an extreme, when n = 1, ˆ =0. 2 The MLE ˆ 2 systematically underestimates θ 2. Why? A bit harder to see, but think about n = 2. Then θ 1 is exactly between the two sample points, the position that exactly minimizes the expression for ˆ 2. Any other choices for (θ 1, θ 2 ) make the likelihood of the observed data slightly lower. But it s actually pretty unlikely that two sample points would be chosen exactly equidistant, and on opposite sides of the mean, so the MLE ˆ 2 systematically underestimates θ

7 Maximum A Posteriori Incorporating priors. How? MLE vs MAP estimation 13 MLE for General Problems Learning problem setting A set of random variables X from unknown distribution P* Training data D = M instances of X: {d[1],,d[m]} A parametric model P(X; Θ) (a legal distribution) Define the likelihood function: L(Θ : D) = Maximum likelihood estimation Choose parameters Θ* that satisfy: 14 7

8 MLE for Bayesian Networks PG = P(x1,x2,x3,x4) = P(x1) P(x2) P(x3 x1,x2) P(x4 x1,x3) Structure G x1 x2 More generally? PG P( x i pai ) i x3 Parameters θ x4 Θx1, Θx2, Θx3 x1,x2, Θx4 x1,x3 (more generally Θxi pai) Given D: x[1], x[m],x[m], estimate θ. (x1[m],x2[m],x3[m],x4[m]) Likelihood decomposition: The local likelihood function for Xi is: 15 Bayesian Network with Table CPDs The Student example The Thumbtack example Intelligence Difficulty vs X Grade Joint distribution P(X) Parameters Data Likelihood function L(θ:D) = P(D;θ) MLE solution θ D: {H x[m] T} P(I,D,G) = θi, θd, θg I,D D: {(i1,d1,g1) (i[m],d[m],g[m]) } θmh(1-θ)mt θˆ Mh Mh Mt 16 8

9 Maximum Likelihood Estimation Review Find parameter estimates which make observed data most likely General approach, as long as tractable likelihood function exists Can use all available information 17 Example Gene Expression Instruction for making the proteins Instruction for when and where to make them Coding Regions Regulatory Regions (Regulons) Regulatory regions contain binding sites (6-20 bp). Binding sites attract a special class of proteins, known as transcription What turns genes factors. on (producing a protein) and off? Bound When is transcription a gene turned factors on off? can initiate transcription (making RNA). Proteins Where (in that which inhibit cells) transcription is a gene turned can on? also be bound to their binding How many sites. copies of the gene product are produced? 18 9

10 Regulation of Genes Transcription Factor (Protein) RNA polymerase (Protein) DNA CG..A AC..T Regulatory Element (binding sites) Gene source: M. Tompa, U. of Washington 19 Regulation of Genes Transcription Factor (Protein) RNA polymerase (Protein) DNA CG..A AC..T Regulatory Element Gene source: M. Tompa, U. of Washington 20 10

11 Regulation of Genes Transcription Factor (Protein) RNA polymerase DNA CG..A AC..T Regulatory Element Gene source: M. Tompa, U. of Washington 21 Regulation of Genes Transcription Factor RNA polymerase DNA CG..A AC..T Regulatory Element source: M. Tompa, U. of Washington New protein 22 11

12 The Gene regulation example What determines the expression level of a gene? What are observed and hidden variables? e.g, e.tf s: observed; Process.G: hidden variables want to infer! Biological process the gene is involved in Expression level of TF 1 e.tf 1 e.tf 2 e.tf 3 e.tf 4... e.tf N Process.G = p 12 3 e.g Expression level of a gene 23 Not All Data Are Perfect Most MLE problems are simple to solve with complete data. Available data are incomplete in some way

13 Outline Learning from data Maximum likelihood estimation (MLE) Maximum a posteriori (MAP) Expectation-maximization (EM) algorithm 25 Continuous Space Revisited... Assuming sample x 1, x 2,, x n is from a mixture of parametric distributions, x 1 x 2 x m x m+1 x n X x 26 13

14 A Real Example CpG content of human gene promoters GC frequency A genome-wide analysis of CpG dinucleotides in the human genome distinguishes two distinct classes of promoters Saxonov, Berg, and Brutlag, PNAS 2006;103: Acknowledgement Profs Daphne Koller & Nir Friedman, Probabilistic Graphical Models Prof Larry Ruzo, CSE 527, Autumn