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.

Get Mastering Probabilistic Graphical Models Using Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.