Lab: Dynamic Bayesian Networks

CSC261 - Artificial Intelligence - Weinman



Summary:
You will investigate probabilities in a temporal Bayesian network model.

Preparation

  1. Open your book to page 569 and review the umbrella world in Figure 15.2.
  2. Launch a model of the umbrella world on the MathLAN:
    drscheme /home/weinman/courses/CSC261/code/dbn/umbrella.scm &
  3. Click "Run"

Exercises

  1. Create the umbrella network shown in the book with the following command
    (define umb-net (umbrella-network 30 (list 0.7 0.3) (list 0.9 0.2)))
    This will create a network having 30 time steps with the sensor and transition probabilities shown in the figure. You should be sure you understand how the numbers match up and what they mean.
    This network assumes that the prior probability P(R0)= < 0.5,0.5 > .
  2. What do you expect the probability P(R1) to be with no evidence? Verify your prediction with the following command.
    (compute-belief umb-net 1 null)
    The first argument is your network, the second argument indicates we are inquiring about R1, and that last argument is the empty evidence list.
  3. How do you expect the probability for rain on day 1 to increase given an umbrella appears on the same day? That is, how do you expect P(R1) and P(R1 | u1) to compare?
  4. Verify your prediction with the following command
    (compute-belief umb-net 1 (list (u 1 30)))
    What does that last argument mean? In short, it says, "Our list of evidence is an observation of an umbrella (given by the u procedure) on day 1, for our model having 30 days."
  5. How do you expect the probability for rain on day 2 to compare to that of day 1 when an umbrella appears on both days? That is, how will P(R2 | u1,u2) compare to P(R1 | u1)?
  6. Verify your prediction by adding the evidence (u 2 30) to your list and inquiring of rain on day two.
  7. How do you expect the probability of rain on day k change as we continue to see an umbrella on days 1 to k?
  8. Verify your prediction by beginning to explore with some queries like the following.
    (compute-belief umb-net 1 (list (u 1 30)))
    (compute-belief umb-net 2 (list (u 1 30) (u 2 30)))
    (compute-belief umb-net 3 (list (u 1 30) (u 2 30) (u 3 30)))
    (compute-belief umb-net 4 (list (u 1 30) (u 2 30) (u 3 30) (u 4 30)))
    or, for the very functionally-minded, something like
    (compute-belief umb-net day (map (lambda (d) (u (+ 1 d) 30)) (iota day))) 
    for a particular day.
  9. Is there a point at which continually seeing an umbrella fails to radically change our belief in the presence of rain? Does that seem intuitive to you?
  10. Assume our evidence is only an umbrella on the first two days. How do you expect the following probabilities to compare?
  11. Verify your predictions.
  12. Compute the probability of rain given no evidence for a variety of days. That is, P(Rk).
  13. How do you expect the evidence u1, u2 to impact Rk as k becomes farther and farther from day 2?
  14. Verify your prediction by examining as many values of P(Rk | u1,u2) as you need. How does this compare to your answers from the previous exercise?

Copyright © 2011 Jerod Weinman.
ccbyncsa.png
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.