UIUC CS498 Homework 3: Bayesian Networks and Probabilistic Inference, Assignments of Computer Science

The third homework assignment for cs498, a graduate course in computer science at the university of illinois at urbana-champaign. The assignment covers topics in bayesian networks, graphical models, probabilistic inference, and undirected graphical models. Students are required to complete various problems related to drawing bayesian networks, calculating probabilities, and proving theoretical results.

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-dap
koofers-user-dap šŸ‡ŗšŸ‡ø

5

(1)

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UIUC, CS498, Section EA - Autumn 04 - Homework #3
Due Date: Tuesday, November 18, 2004, 12pm
November 9, 2004
1 Graphical Models (25%)
1. Consider a Bayesian network that describes relationship between genes of parents and children. The
genes of every child are determined by the genes of its parents, with some noise. Pat and Sue are
parents to Marge, Pat and Mary are parents to Fay, Mary and Bob are parents to Homer, Homer and
Marge are parents to Bart, Lisa, and Maggie. Fay and Homer are parents to Sue, and Bart and Sue
are parents to John.
(a) Draw the Bayesian network that describes these relationships.
(b) Draw a triangulated version of this network. Is it moralized?
(c) In this graph, are are Homer, M arge, d-separated by Bart?
(d) Are Homer, M arge, d-separated by Bart, Lisa, M agg ie?
(e) Are Homer, M arge, d-separated by P at, Bar t, Lisa, M aggie?
(f) Are H omer, Marg e independent?
(g) Are Homer, M arge independent given John?
2. Prove that whenever X, Y are vertex-separated by Z, in an undirected graphical model, then X, Y are
independent given Z.
3. Give an example of an undirected graphical model that encodes conditional independence assumptions
that cannot be captured by a directed graphical model (Bayesian network) on the same variables.
4. Give an example of a directed graphical model that encodes conditional independence assumptions
that cannot be captured by an undirected graphical model on the same variables.
2 Exact Probabilistic Inference (25%)
1. Consider the Bayesian network in Figure 1. All variables have four states, besides Athat has three.
(a) Calculate the size of the table P(A, B, C, D =d1).
(b) In the calculation P(A|E=e1) the variables have been marginalized in the following order:
B, C, D, F , G, H. Calculate the size of each table produced in the process, and sum the sizes up.
(c) Find an elimination order that yields a smaller sum of table sizes than the one you achieved in
1b.
(d) Construct a junction tree for this network.
2. BN has the potentials in Table ??.
(a) Calculate P(A|D=y), P(B|D=y), P(C|D=y).
1
pf3

Partial preview of the text

Download UIUC CS498 Homework 3: Bayesian Networks and Probabilistic Inference and more Assignments Computer Science in PDF only on Docsity!

UIUC, CS498, Section EA - Autumn 04 - Homework

Due Date: Tuesday, November 18, 2004, 12pm

November 9, 2004

1 Graphical Models (25%)

  1. Consider a Bayesian network that describes relationship between genes of parents and children. The genes of every child are determined by the genes of its parents, with some noise. Pat and Sue are parents to Marge, Pat and Mary are parents to Fay, Mary and Bob are parents to Homer, Homer and Marge are parents to Bart, Lisa, and Maggie. Fay and Homer are parents to Sue, and Bart and Sue are parents to John.

(a) Draw the Bayesian network that describes these relationships. (b) Draw a triangulated version of this network. Is it moralized? (c) In this graph, are are Homer, M arge, d-separated by Bart? (d) Are Homer, M arge, d-separated by Bart, Lisa, M aggie? (e) Are Homer, M arge, d-separated by P at, Bart, Lisa, M aggie? (f) Are Homer, M arge independent? (g) Are Homer, M arge independent given John?

  1. Prove that whenever X, Y are vertex-separated by Z, in an undirected graphical model, then X, Y are independent given Z.
  2. Give an example of an undirected graphical model that encodes conditional independence assumptions that cannot be captured by a directed graphical model (Bayesian network) on the same variables.
  3. Give an example of a directed graphical model that encodes conditional independence assumptions that cannot be captured by an undirected graphical model on the same variables.

2 Exact Probabilistic Inference (25%)

  1. Consider the Bayesian network in Figure 1. All variables have four states, besides A that has three.

(a) Calculate the size of the table P (A, B, C, D = d 1 ). (b) In the calculation P (A|E = e 1 ) the variables have been marginalized in the following order: B, C, D, F, G, H. Calculate the size of each table produced in the process, and sum the sizes up. (c) Find an elimination order that yields a smaller sum of table sizes than the one you achieved in 1b. (d) Construct a junction tree for this network.

  1. BN has the potentials in Table ??.

(a) Calculate P (A|D = y), P (B|D = y), P (C|D = y).

A

B

C

D

E

F G^ H

Figure 1: Bayesian network.

A A B,C

B y n C y n D y,y y,n n,y n,n y 0.2 0.6 y 0.1 0.5 y 0.3 0.9 0.2 0. n 0.8 0.4 n 0.9 0.5 n 0.7 0.1 0.8 0.

P (B|A) P (C|A) P (D|B, C)

Figure 2: BN Potentials

(b) Calculate P (B|C = y).

  1. One reason why variable elimination can be done in time that is exponential only in the treewidth of the graph, is the commutativity of the operations of summation and product when these do not refer to the same terms (e.g.,

A,B,C f^ (A, B)f^ (B, C) =^

A,B (f^ (A, B)^

C f^ (B, C))), provided the factors are non-negative (which holds for potentials representing probability distributions). A similar commutativ- ity holds for the max function, namely, maxA,B,C f (A, B)f (B, C) = maxA,B (f (A, B) maxC f (B, C))). Create an algorithm for finding the most likely configuration of a set of random variables, C, given some evidence, E, and marginalizing over the rest of the random variables, R. This is called MPE (Most Probable Explanation), and is defined formally as argmaxC P r(C, E, R). Prove that your algorithm is correct.

3 Sampling (25%)

  1. We are given an image of 100x100 pixels (256 values each gray scale), and are looking for an object in that image. We know that the object is particularly dark (with some variation in darkness across it) in comparison with the background, but we do not know where it is or what that darkness means in pixel values. However, we do know that if a pixel belongs to the object then the adjacent pixel belongs to the object w.h.p., and that significant changes in intensity across pixels increase the probability of the darker pixel being part of an object. Close-by dark pixels also increase the probability of those pixels belonging to the object. Our task is to find a pixel that belongs to the object with the highest probability.

(a) Represent this problem with a generative model Bayesian network (i.e., an object is at a position and size with some prior, and generates pixel values with some distribution as a result). (b) Download the Bayes Net Toolbox for Matlab (from Kevin Murphy: http://www.ai.mit.edu/ mur- phyk/Software/BNT/bnt.html) and use any sampling algorithm from those in the package (e.g.,