Question: 4 Junction Tree Algorithm (15 points) Consider the family of undirected graphical models known as Markov chains as shown below. 4 X1 X2 X3 T5

4 Junction Tree Algorithm (15 points)\ Consider the family of undirected graphical models known as Markov chains as shown below.\ 4\ X1 X2 X3 T5 \ For simplicity, assume all variables in the model are binary. The probability distribution implied by the undirected graph is p(x1,..,x5) = 2p(x1,r2)(x2,x3)\\\\psi (r3,x4)4(x4,x5).Write an implemen- tation of the junction tree algorithm that computes all the pairwise marginals p(ri, xi+1) for such a Markov chain for any number of variables n and any initialization of the clique potential functions. The initial clique potentials will serve as inputs to your junction tree algorithm and should be a cell array of n - 1 elements, each of which is a 2 x 2 matrix of non-negative values as shown in the following Matlab code: n =5;\ psis = cell(n-11); for i = 1:(n-1)\ psis{i} = rand(2,2); end\ The output of your junction tree algorithm (JTA) should be an identical data structure. It should contain consistent marginals that sum to unity appropriately and agree pairwise. Since the tree is only a chain, you don't have to implement a recursive algorithm (i.e. the Collect and Distribute steps in the Jordan book). Instead, you only need to perform left to right message passing and then right to left message passing by using a for loop or standard iteration. In other words, the JTA should process the cliques for i=1 : n-1 and then for i=n-1:-1:1 to do all the necessary messages in the JTA.\ Test your algorithm by recovering the pairwise marginals when given the following values for the potential functions in the graphical model. Show code, results, and discussion.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!