Sampling from a Bayesian network

Performing a direct inference on a Bayesian network can be a very complex operation when the number of variables and edges is high. For this reason, several sampling methods have been proposed. In this paragraph, we are going to show how to determine the full joint probability sampling from a network using a direct approach, and two MCMC algorithms.

Let's start considering the previous network and, for simplicity, let's assume to have only Bernoulli distributions. X1 and X2 are modeled as:

The conditional distribution X3 is defined as:

While the conditional distribution X4 is defined as:

We can now use a ...

Get Mastering Machine Learning Algorithms 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.