By: Chad Scherrer
Re-posted from: https://cscherrer.github.io/post/variational-importance-sampling/
Lots of distributions are easy to evaluate (the density), but hard to sample. So when we need to sample such a distribution, we need to use some tricks. We’ll see connections between two of these: importance sampling and variational inference, and see a way to use them together for fast inference.
Importance sampling Importance sampling aims to make it easy to compute expected values. Say we have a distribution \(p\), and we’d like to compute the average of some function \(f\) of the distribution (or equivalently, the expected value of a "push-forward along \(f\)").