PGM - Programming Exercise 2

PGM 2004/05 - Programming Ex2

Approximate Inference

Submission: 13/01/05 at Ross closing time

Don't forget to read the exercise guidelines

In this exercise you will build an approximate inference program for an undirected network with loops. You will implement several inference methods: Gibbs sampling, Mean-field inference and Loopy Belief Propagation. You will compare the solution of these methods to the exact inference solution.

We will explore the problem of inference on a wrap-around grid undirected network where each unobserved node X in the grid has a corresponding observed node Y:

For the tasks defined below you will have to evalute the performance of inference algorithms. Use the KL measure ( KL(p(x)||q(s))=sum{p(x)log(p(x)/q(x))} ) to evaluate the "distance" of the predicted distribution for each node and its exact solution distribution. For each of the tasks below consider both the average and the maximum KL distance over the nodes.

Part 1: Tasks

Use the methods defined in the "Code" part and the files in here to do the following:

Important: Don't forget to discuss all of the experiments in the evaluation file. You are expected to show insight and understanding of what is going on and not merely report results.

Part 2: Code

You should implement the following methods:

Submission

You should tar only your .m file along with the EVALUATION file and figure files (in EPS or PS format) and submit it through the submission link in the course home page. Do not forget to register to the course first through the register link. DO NOT gzip your tar file.

Please make sure the .m file names match the method names and are EXACTLY as specified. Also, make sure your login appears at the top of each file in a matlab comment