Importance Sampling

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

Importance Sampling

Importance Sampling

Basic idea:
q(x) is an arbitrary importance proposal distribution.
Its support includes the support of p(x)

I ( f ) f ( x)w( x)q( x)dx


p( x)
w( x)
q( x)

Importance weight

Importance Sampling

Basic idea:

I ( f ) f ( x)w( x)q( x)dx


We can simulate N i.i.d. samples
{x (i)} @ i=1,,N according to q(x)
and evaluate w(x(i))

Monte Carlo estimate


N

I N ( f ) f ( x ( i ) ) w( x ( i ) )
i 1

Importance Sampling

Monte Carlo estimate


N

I N ( f ) f ( x ( i ) ) w( x ( i ) )
i 1

Unbiased estimator
a.s.

The strong law of large numbers applies IN ( f ) I ( f )


N

This integration method can also be interpreted as a


sampling method, the density posterior is
approximated by
N

p N ( x) w( x ( i ) ) x ( i ) ( x)
i 1

Importance Sampling

q(x) proposal distribution ?


An important
distribution is
the estimator

criterion for choosing an optimal proposal


to find one that minimizes the variance of
IN ( f )

varq( x) f ( x)w( x) q( x) f 2 ( x)w2 ( x) I 2 f


Optimal importance distribution means that high sampling
Efficiency is achieved when we focus on sampling from
p(x) in the importance regions where |f(x)|p(x) is relatively
large

q ( x)

f ( x) p ( x)

f ( x) p( x)dx

Estos es una
normalizacin

Importance Sampling

q(x) proposal distribution ?


It is wasteful to propose candidates in regions of no utility

The aim for some applications is to have a good


approximation of p(x) and not of a particular integral with
respect to p(x), so q(x) ~ p(x)

As the dimension of x increases, it becomes harder to


obtain a suitable q(x).

Importance Sampling

q(x) proposal distribution ?


When the normalizing constant of p(x) is unknown, it
is still possible to apply the importance sampling method
by
rewriting I(f) :

I ( f ) f ( x)w( x)q( x)dx

p( x)
w( x)
q ( x)

f ( x) w( x)q( x)dx

I( f )
w
(
x
)
q
(
x
)
dx

Importance Sampling

Monte Carlo estimate

I( f )

f ( x) w( x)q( x)dx

w( x)q( x)dx

~
IN ( f )

1
N

f x (i ) w x (i )

i 1

1
N

wx
N

(i )

i 1

Importance Sampling

Monte Carlo estimate

~
IN ( f )

1
N

f x (i ) w x (i )

i 1

1
N

wx

Normalized
Importance weight

(i )

i 1

wx
(i )
~
wx N
(i )

w
x

(i )

i 1

~
(i ) ~ (i )
IN ( f ) f x w x
i 1

Importance Sampling

Monte Carlo estimate

~
(i ) ~ (i )
IN ( f ) f x w x
i 1

It is a biased estimator (ratio of 2 estimates), but


asymptotically, under weak assumptions, the strong law
of large numbers applies
a.s.

~
IN ( f ) I( f )
N

Under additional assumptions a central limit theorem can


be obtained

~
IN ( f )
The estimator
has been
better than I ( f ) in some setups
N

shown to perform

Importance Sampling

It is often impossible to obtain proposal distributions that


are easy to sample from and good approximations at the
same time

More sophisticated sampling algorithms are needed


based on Markov chains

You might also like