Book Image

Mastering Probabilistic Graphical Models with Python

By : Ankur Ankan
Book Image

Mastering Probabilistic Graphical Models with Python

By: Ankur Ankan

Overview of this book

Table of Contents (14 chapters)
Mastering Probabilistic Graphical Models Using Python
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Importance sampling


As it turns out, likelihood weighting is a special case of a more generic method known as importance sampling. In this section, we will talk about importance sampling and show how likelihood weighting is derived from it.

Importance sampling is an approach used to estimate the expectation of a function relative to some distribution P(X), known as target distribution. As we saw in the previous sections, we can easily do this by generating particles from P and then estimating the following:

However, in some cases, we may want to generate samples from some other distribution Q, known as proposal distribution or sampling distribution, for whatever reason (for instance, it might be impossible or computationally very expensive to generate samples from P). For example, P might be a posterior distribution of a Bayesian network and hence, computing it may be very expensive. To deal with such problems, in this section, we will discuss methods to get expectation estimates relative...