08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

∑<br />

x 2 ,x 3<br />

x 1 (x 1 + x 2 + x 3 )(2 + x 3 ) = 10x 2 1 + 11x 1<br />

x 1 ↑<br />

x 1<br />

(x 1 + x 2 + x 3 )(2 + x 3 ) ↑<br />

x 1 x 1 + x 2 + x 3<br />

1 ↑<br />

∑<br />

x 4 ,x 5<br />

(x 3 + x 4 + x 5 )x 4 x 5<br />

= 2 + x 3 ↑<br />

x 2 x 3<br />

(x 3 + x 4 + x 5 )x 4 x 5 ↑<br />

x 3 + x 4 + x 5<br />

x 4 ↑<br />

x 5 ↑<br />

x 4 x 5<br />

x 4 ↑<br />

x 5 ↑<br />

x 4 x 5<br />

Figure 9.4: Messages.<br />

downwards for this pass. Each node waits until its parent has sent it a message before<br />

sending messages to each <strong>of</strong> its children. The rules for messages are:<br />

Rule 1 The message from a factor node v to a child x i , which is the variable node x i ,<br />

is the product <strong>of</strong> all messages received by v in both passes from all nodes other than x i<br />

times the factor at v itself.<br />

Rule 2 The message from a variable node x i to a factor node child, v, is the product<br />

<strong>of</strong> all messages received by x i in both passes from all nodes except v, with all variables<br />

except x i summed out. The message is a function <strong>of</strong> x i alone.<br />

At termination, when the graph is a tree, if we take the product <strong>of</strong> all messages received<br />

in both passes by a variable node x i and sum out all variables except x i in this<br />

product, what we get is precisely the entire function marginalized to x i . We do not give<br />

the pro<strong>of</strong> here. But the idea is simple. We know from the first pass that the product <strong>of</strong><br />

314

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!