next up previous
Next: Bonus example: Moral graph Up: MLA_Exercises_2009 Previous: Inference in Factor Graphs

Inference in Factor Graphs II [2+2* P]

Figure: Bayesian network for the lung cancer problem.
Apply the sum-product algorithm to a Bayesian network for the lung cancer problem described in Figure 3. The lung cancer dataset is available for download on the course homepage2. See lungcancer.txt for a description of the data set. You are required to use MATLAB for this assignment.

a)
Write down the joint distribution over the five random variables $ P,S,C,D$ and $ X$ defined by the Bayesian network.

b)
All random variables in the graph are binary (or Boolean) variables $ x \in \{ 0,1\}$ . The conditional distributions determined in a) can therefore be written in the form of the Bernoulli distribution

$\displaystyle Bern(x)=\mu^{x}(1-\mu)^{(1-x)}$

with parameter $ \mu$ . Calculate the maximum likelihood value $ \mu_{ML}$ for each of the conditional distributions from the data.

c)
Construct a factor graph from the Bayesian network.

d)
Apply the sum-product algorithm to the factor graphs obtained in c) for the two problem settings shown in the bottom panels of Figure 3 to calculate the marginal distributions of the query variables (black circles) given the indicated evidence (gray circles). Assume that the observed random variables always have the value 1 (or true in case of Boolean variables).

e)
[2* P] Apply the sum-product algorithm to the factor graphs obtained in c) for the two problem settings shown in the top panels of Figure 3 to calculate the joined distributions of the query variables (black circles) given the indicated evidence (gray circles). Assume that the observed random variables always have the value 1 (or true in case of Boolean variables).


next up previous
Next: Bonus example: Moral graph Up: MLA_Exercises_2009 Previous: Inference in Factor Graphs
Haeusler Stefan 2010-01-26