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

Markov chain Monte Carlo methods


The LW sampling algorithm correctly samples the posterior of the descendant nodes, but for the nondescendants, it samples the prior and tries to fix it with the weightings. So, for the case where we have most of the observed nodes as leaves of the network, we would be sampling the prior rather than the posterior. We will now discuss an algorithm that generates a sequence of samples. The first samples generated may be near to the prior, but as we keep on generating samples, it keeps getting closer to the posterior. Also, this sampling algorithm works for both Bayesian and Markov networks.