Docsity

Bayesian Statistical Learning: Maximum A Posteriori and Maximum Likelihood Approaches, Study notes of Computer Science

Partial preview of the text

Download Bayesian Statistical Learning: Maximum A Posteriori and Maximum Likelihood Approaches and more Study notes Computer Science in PDF only on Docsity!

Chapter 20, Sections 1–3Statistical learning

Chapter 20, Sections 1–

Outline

Bayesian learning

Maximum

a posteriori

and maximum likelihood learning

Bayes net learning

  • linear regression– ML parameter learning with complete data

Chapter 20, Sections 1–

Example

Suppose there are five kinds of bags of candies:

10% are

h

1 : 100% cherry candies

20% are

h

2 : 75% cherry candies + 25% lime candies

40% are

h

3 : 50% cherry candies + 50% lime candies

20% are

h

4 : 25% cherry candies + 75% lime candies

10% are

h

5 : 100% lime candies

What kind of bag is it? What flavour will the next candy be? Then we observe candies drawn from some bag:

Chapter 20, Sections 1–

Posterior probability of hypotheses

0

0.2 0.4 0.6 0.

1 0 2 4 6 8

10

Posterior probability of hypothesis

Number of samples in

d

P ( h 1 | d ) P ( h 2 | d ) P ( h 3 | d ) P ( h 4 | d ) P ( h 5 | d )

Chapter 20, Sections 1–

MAP approximation

Maximum a posteriori(e.g., 18,446,744,073,709,551,616 Boolean functions of 6 attributes) Summing over the hypothesis space is often intractable

(MAP) learning: choose

h

MAP

maximizing

P

h

i | d

)

I.e., maximize

P

d

| h

i ) P

(^) ( h

i )

or

log

P

d

| h

i ) + log

P

h

i )

Log terms can be viewed as (negative of)

bits to encode data given hypothesis

bits to encode hypothesis

This is the basic idea of

minimum description length

(MDL) learning

For deterministic hypotheses,

P

d

| h

i )

is 1 if consistent, 0 otherwise

MAP = simplest consistent hypothesis (cf. science)

Chapter 20, Sections 1–

ML approximation

Maximum likelihood For large data sets, prior becomes irrelevant

(ML) learning: choose

h

ML

maximizing

P

d

| h

i )

ML is the “standard” (non-Bayesian) statistical learning method(which is reasonable if all hypotheses are of the same complexity) I.e., simply get the best fit to the data; identical to MAP for uniform prior

Chapter 20, Sections 1–

Multiple parameters

Red/green wrapper depends probabilistically on flavor:

P

F=cherry

(

)

Flavor

Wrapper

P (

)

W=red

(^) | (^) F

cherryF

2

lime

θ

1

θ

θ

Likelihood for, e.g., cherry candy in green wrapper:

P

F

cherry

W

(^) green

h

θ,θ

1 ,θ 2 )

P

F

cherry

h

θ,θ

1 ,θ

2 ) P

(^) ( W

green

F

(^) cherry

, h

θ,θ

1 ,θ 2 )

θ

·

(

θ 1 )

N

candies,

r c

red-wrapped cherry candies, etc.:

P

d

| h

θ,θ

1 ,θ

2 ) =

θ c (

− θ ) ` · θ r c

1

(

− θ 1 ) g c · θ r `

2

(

− θ 2 ) g `

L

= [

c

log

(^) θ

`

log(

θ )]

+ [

r c log

(^) θ

1

g c log(

θ 1 )]

+ [

r ` log

(^) θ

2

g ` log(

θ 2 )]

Chapter 20, Sections 1–

10

Multiple parameters contd.

Derivatives of

L

contain only the relevant parameter:

∂θ^ ∂L

θ c

`

θ

θ

c

c

`

∂θ ∂L

1

r c

θ 1

−

g c

θ 1

= 0

⇒ θ 1 = r c

r c

g c

∂θ ∂L

2

r `

θ 2

−

g `

θ 2

= 0

⇒ θ 2 = r `

r `

g `

With

complete data

parameters can be learned separately

Chapter 20, Sections 1–

Summary

may be hard/impossible; modern optimization techniques help4. Find the parameter values such that the derivatives are zero 3. Write down the derivative of the log likelihood w.r.t. each parameter may require summing over hidden variables, i.e., inference 2. Write down the likelihood of the data as a function of the parameters requires substantial insight and sometimes new models1. Choose a parameterized family of models to describe the dataMaximum likelihood assumes uniform prior, OK for large data setsMAP learning balances complexity with accuracy on training data Full Bayesian learning gives best possible predictions but is intractable

Chapter 20, Sections 1–