CSE446: Point Estjmatjon Spring 2017 Ali Farhadi Slides adapted - - PowerPoint PPT Presentation

cse446 point estjmatjon spring 2017
SMART_READER_LITE
LIVE PREVIEW

CSE446: Point Estjmatjon Spring 2017 Ali Farhadi Slides adapted - - PowerPoint PPT Presentation

CSE446: Point Estjmatjon Spring 2017 Ali Farhadi Slides adapted from Carlos Guestrin, Dan Klein, and Luke Zetulemoyer Your fjrst consultjng job A billionaire from the suburbs of Seatule asks you a questjon: He says: I have thumbtack, if


slide-1
SLIDE 1

CSE446: Point Estjmatjon Spring 2017

Ali Farhadi

Slides adapted from Carlos Guestrin, Dan Klein, and Luke Zetulemoyer

slide-2
SLIDE 2

Your fjrst consultjng job

  • A billionaire from the suburbs of Seatule asks you a questjon:

– He says: I have thumbtack, if I fmip it, what’s the probability it will fall with the nail up? – You say: Please fmip it a few tjmes: – You say: The probability is:

  • P(H) = 3/5

–He says: Why???

– You say: Because…

slide-3
SLIDE 3

Thumbtack – Binomial Distributjon

  • P(Heads) = θ, P(Tails) = 1-θ
  • Flips are i.i.d.:

– Independent events – Identjcally distributed according to Binomial distributjon

  • Sequence D of αH Heads and αT Tails

D={xi | i=1…n}, P(D | θ ) = ΠiP(xi | θ )

slide-4
SLIDE 4

Maximum Likelihood Estjmatjon

  • Data: Observed set D of αH Heads and αT Tails
  • Hypothesis space: Binomial distributjons
  • Learning: fjnding θ is an optjmizatjon problem

– What’s the objectjve functjon?

  • MLE: Choose θ to maximize probability of D
slide-5
SLIDE 5

Your fjrst parameter learning algorithm

  • Set derivatjve to zero, and solve!
slide-6
SLIDE 6

But, how many fmips do I need?

  • Billionaire says: I fmipped 3 heads and 2 tails.
  • You say: θ = 3/5, I can prove it!
  • He says: What if I fmipped 30 heads and 20 tails?
  • You say: Same answer, I can prove it!
  • He says: What’s betuer?
  • You say: Umm… The more the merrier???
  • He says: Is this why I am paying you the big bucks???
slide-7
SLIDE 7

N

  • Prob. of Mistake

Exponential Decay!

A bound (from Hoefgding’s inequality)

  • For N =αH+αT, and
  • Let θ * be the true parameter, for any ε>0:
slide-8
SLIDE 8

PAC Learning

  • PAC: Probably Approximate Correct
  • Billionaire says: I want to know the thumbtack θ,

within ε = 0.1, with probability at least 1-δ = 0.95.

  • How many fmips? Or, how big do I set N ?

Interesting! Lets look at some numbers!

  • ε = 0.1, δ=0.05
slide-9
SLIDE 9

What if I have prior beliefs?

  • Billionaire says: Wait, I know that the thumbtack

is “close” to 50-50. What can you do for me now?

  • You say: I can learn it the Bayesian way…
  • Rather than estjmatjng a single θ, we obtain a

distributjon over possible values of θ

In the beginning After observations

Observe flips e.g.: {tails, tails}

slide-10
SLIDE 10

Bayesian Learning

  • Use Bayes rule:
  • Or equivalently:
  • Also, for uniform priors:

Prior Normalization Data Likelihood Posterior  reduces to MLE objective

slide-11
SLIDE 11

Bayesian Learning for Thumbtacks

Likelihood functjon is Binomial:

  • What about prior?

– Represent expert knowledge – Simple posterior form

  • Conjugate priors:

– Closed-form representatjon of posterior – For Binomial, conjugate prior is Beta distributjon

slide-12
SLIDE 12

Beta prior distributjon – P(θ)

  • Likelihood functjon:
  • Posterior:
slide-13
SLIDE 13

Posterior distributjon

  • Prior:
  • Data: αH heads and αT tails
  • Posterior distributjon:
slide-14
SLIDE 14

MAP for Beta distributjon

  • MAP: use most likely parameter:
  • Beta prior equivalent to extra thumbtack flips
  • As N → ∞, prior is “forgotten”
  • But, for small sample size, prior is important!
slide-15
SLIDE 15

What about contjnuous variables?

  • Billionaire says: If I am

measuring a contjnuous variable, what can you do for me?

  • You say: Let me tell

you about Gaussians…

slide-16
SLIDE 16

Some propertjes of Gaussians

  • Affjne transformatjon (multjplying by

scalar and adding a constant) are Gaussian

– X ~ N(µ,σ2) – Y = aX + b  Y ~ N(aµ+b,a2σ2)

  • Sum of Gaussians is Gaussian

– X ~ N(µX,σ2X) – Y ~ N(µY,σ2Y) – Z = X+Y  Z ~ N(µX+µY, σ2X+σ2Y)

  • Easy to difgerentjate, as we will see soon!
slide-17
SLIDE 17

Learning a Gaussian

  • Collect a bunch of data

–Hopefully, i.i.d. samples –e.g., exam scores

  • Learn parameters

–Mean: μ –Variance: σ

xi i = Exam Score 85 1 95 2 100 3 12

… …

99 89

slide-18
SLIDE 18

MLE for Gaussian:

  • Prob. of i.i.d. samples D={x1,…,xN}:
  • Log-likelihood of data:
slide-19
SLIDE 19

Your second learning algorithm: MLE for mean of a Gaussian

  • What’s MLE for mean?
slide-20
SLIDE 20

MLE for variance

  • Again, set derivatjve to zero:
slide-21
SLIDE 21

Learning Gaussian parameters

  • MLE:
  • BTW. MLE for the variance of a Gaussian is biased

– Expected result of estjmatjon is not true parameter! – Unbiased variance estjmator:

slide-22
SLIDE 22

Bayesian learning of Gaussian parameters

  • Conjugate priors

– Mean: Gaussian prior – Variance: Wishart Distributjon

  • Prior for mean: