Exponential Families Leila Wehbe March 19, 2013 Leila Wehbe - - PowerPoint PPT Presentation

exponential families
SMART_READER_LITE
LIVE PREVIEW

Exponential Families Leila Wehbe March 19, 2013 Leila Wehbe - - PowerPoint PPT Presentation

Exponential Families Exponential Families Leila Wehbe March 19, 2013 Leila Wehbe Exponential Families Exponential Families Exponential Families Functions of the sort: p ( x , ) = exp( < ( x ) , > g ( )) Where ( x )


slide-1
SLIDE 1

Exponential Families

Exponential Families

Leila Wehbe March 19, 2013

Leila Wehbe Exponential Families

slide-2
SLIDE 2

Exponential Families

Exponential Families

Functions of the sort: p(x, θ) = exp(< φ(x), θ > −g(θ)) Where φ(x) is a sufficient statistic: ”no other statistic which can be calculated from the same sample provides any additional information as to the value of the parameter”

Leila Wehbe Exponential Families

slide-3
SLIDE 3

Exponential Families

Exponential Families

p(x, θ) = exp(< φ(x), θ > +g(θ)) g(θ) = log

x exp(< φ(x), θ >) is the partition function.

g(θ) = log

  • x exp(< φ(x), θ >)dx if x continuous
  • p(x, θ)dx

=

  • exp(< φ(x), θ > −g(θ))dx

= 1 exp (g(θ))

  • exp(< φ(x), θ >)dx = 1

exp (g(θ)) =

  • exp(< φ(x), θ >)dx

g(θ) = log

  • x

exp(< φ(x), θ >)dx

Leila Wehbe Exponential Families

slide-4
SLIDE 4

Exponential Families

Example: Bernoulli distribution

p(x) = px(1 − p)(1−x) φ(x) = x θ = log(

p 1−p)

g(θ) = log(1 + eθ) p(x = 1) =

eθ 1+eθ = 1 e−θ+1 and p(x = 0) = 1 1+eθ

Leila Wehbe Exponential Families

slide-5
SLIDE 5

Exponential Families

Example: Normal distribution

p(x) =

1 σ √ 2π exp( −(x−µ)2 2σ2

φ(x) = [x, x2] θ = [ µ

σ2 , −1 2σ2 ]

g(θ) = − θ2

1

4θ2 − 1 2 log(−2θ2)

Leila Wehbe Exponential Families

slide-6
SLIDE 6

Exponential Families

Log Partition Function generates cumulants

∂θg(θ) = ∂θ log

  • exp < φ(x), θ > dx

=

  • φ(x) exp < φ(x), θ > dx
  • exp < φ(x), θ > dx

=

  • φ(x) exp(< φ(x), θ > −g(θ))dx

= E[φ(x)]

Leila Wehbe Exponential Families

slide-7
SLIDE 7

Exponential Families

Log Partition Function generates cumulants

∂2

θg(θ)

= ∂θ

  • φ(x) exp(< φ(x), θ > −g(θ))dx

=

  • φ(x)[φ(x)⊤ − ∂θg(θ)] exp(< φ(x), θ > −g(θ))dx

= E[φ(x)φ(x)⊤] − E[φ(x)]E[φ(x)]⊤

Leila Wehbe Exponential Families

slide-8
SLIDE 8

Exponential Families

Example: Bernoulli distribution

g(θ) = log(1 + eθ) E[x] = ∂θg(θ) =

eθ 1+eθ = p(x = 1)

Var[x] = ∂2

θg(θ) = eθ [1+eθ]2 = p(x = 1)p(x = 0)

Leila Wehbe Exponential Families

slide-9
SLIDE 9

Exponential Families

Example: Poisson distribution

p(x) = λxe−λ x! φ(x) = x g(θ) = eθ = λ p(x) = 1 x! exp(xθ − eθ) = [eθ]xe−eθ x! = λxe−λ x! E[x] = ∂θg(θ) = eθ = λ Var[x] = ∂2

θg(θ) = eθ = λ

Leila Wehbe Exponential Families

slide-10
SLIDE 10

Exponential Families

MLE

Write down likelihood: log p(X|θ) = log n

i=1 p(xi|θ) = n i=1 < φ(xi), θ > −g(θ)

Differentiate: ∂θ log p(X; θ) = m[ 1

m

n

i=1 φ(xi) − E[φ(x)]] 1 m

n

i=1 φ(xi) is the sample average.

Leila Wehbe Exponential Families

slide-11
SLIDE 11

Exponential Families

MLE

For a bernoulli distribution: φ(x) = x and g(θ) = log(1 + eθ) E[x] = 1 1 + e−θ =

  • i xi

N

Leila Wehbe Exponential Families

slide-12
SLIDE 12

Exponential Families

Conjugate Priors

Incorporate prior is similar to adding fake data: p(θ) ∝ p(Xfake|θ) p(θ|X) ∝ p(X|θ)p(Xfake|θ) = p(X ∪ Xfake|θ) p(θ|µ0, m0, X) ∝ p(θ|µ0, m0)p(X|θ) ∝ exp(< m0µ0 +

m

  • i=1

φ(xi), θ > −(m0 + m)g(θ))

Leila Wehbe Exponential Families

slide-13
SLIDE 13

Exponential Families

Conjugate Priors

The prior is also in the exponential family: p(θ|µ0, m0) = exp(m0 < µ0, θ > −m0g(θ) − h(m0µ0, m0)) = exp(< φ(θ), ρ > −h(ρ)) where φ(θ) = (θ, −g(θ))

Leila Wehbe Exponential Families

slide-14
SLIDE 14

Exponential Families

MAP with generalized laplace smoothing

1 n+m

n

i=1 φ(xi) + m n+mµ0

For normal distribution: MLE: ˆ µ = 1

n

n

i=1 xi and σ2 = 1 n

n

i=1 x2 i − ˆ

µ2 MAP: ˆ µ =

1 n+n0

n

i=1 xi + m n+mµ and σ2 = 1 n+n0

n

i=1 x2 i + n0 n+n0 I − ˆ

µ2

Leila Wehbe Exponential Families

slide-15
SLIDE 15

Exponential Families

Conjugate Priors

Leila Wehbe Exponential Families