gtbook / robotics

Notebook-based book "Introduction to Robotics and Perception" by Frank Dellaert and Seth Hutchinson
https://www.roboticsbook.org/
BSD 3-Clause "New" or "Revised" License
348 stars 57 forks source link

Typo in 3.4.1? #15

Closed gchenfc closed 2 years ago

gchenfc commented 2 years ago

In Section 3.4.1, the Bayes Net indicates the conditional $P(W | X, \textbf{Z}) $ whereas the table describing the posterior P(X, Y | w, z) uses conditional $P(W | X, \textbf{Y})$:

Bayes Net:

image
wxyz.add(W1, [X1, Z1], "1/1 1/1 1/1 1/1")
wxyz.add(X1, [Y1, Z1], "1/1 1/1 1/1 1/1")
wxyz.add(Y1, [Z1], "1/1 1/1")
wxyz.add(Z1, "1/1")

Table describing the posterior P(X, Y | w, z):

x y P(W=2, X=x, Y=y, Z=7)
1 1 P(W=2\X=1, Y=1)P(X=1\Y=1, Z=7)P(Y=1\Z=7)P(Z=7)
1 2 P(W=2\X=1, Y=2)P(X=1\Y=2, Z=7)P(Y=2\Z=7)P(Z=7)
... ... ...
10 9 P(W=2\X=10, Y=9)P(X=10\Y=9, Z=7)P(Y=9\Z=7)P(Z=7)
10 10 P(W=2\X=10, Y=10)P(X=10\Y=10, Z=7)P(Y=10\Z=7)P(Z=7)
$\sum_{x, y}$P(W=2, X=x, Y=y, Z=7)

And also in Exercise 1 (3.4.1.1),

  1. Show that in the example above, if we condition on known values for $\mathcal{Z}=(X,Y)$, the posterior $P(W,Z|X,Y)$ factors, and as a consequence we only have to enumerate two tables of length 10, instead of a large table of size 100.

If the Bayes Net is supposed to be $P(W | X, Y)$ then this makes sense / can factorize, but if it's supposed to be $P(W | X, Z)$, then I think the exercise should read "... $\mathcal{Z}=(X, Z)$, the posterior $P(W, Y | X, Z)$ factors..."

Perhaps I misunderstood the exercise, but I think I am correctly understanding (that conditioning on a separating set of variables disconnects the graph to allow efficient factorization) based on the "hint" in exercise 3:

  1. Show that if we are given the states, inferring the actions is actually quite efficient, even with the brute force enumeration. Hint: this is similar to the first exercise above.
dellaert commented 2 years ago

Hey @gchenfc - I'll be traveling but if you feel confident just create a PR with the corrections? I'll then approve and merge, and fix any issues with rendering, if any. I recommend editing in VS code, and make sure all figures are rendered before you commit.

dellaert commented 2 years ago

Thanks for flagging this, @gchenfc ! I edited this now - will be live soon.