Variable elimination

Let's try to do some inference tasks over the restaurant network in Fig 3.1. Let's say we want to find P(C). We know the following from the chain rule of probability:

Variable elimination

Also, we know that the random variables L and Q are independent of each other if C is not observed. So, we can write the preceding equation as follows:

Variable elimination

Now, we can see that we know the probability values involved in the product for the computation of P(C). We have the values of from the CPD of C, the values of P(l) from the CPD of L, and the values of P(q) from the ...

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.