!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
No Title
Lab: Temporal Bayesian Networks
CSC 261 - Weinman
- Summary:
- You will investigate probabilities in a temporal Bayesian
network model.
Preparation
- Open your book to page 540 and review the umbrella world in Figure
15.2.
- Launch a model of theumbrella world on the MathLAN:
drscheme /home/weinman/courses/CSC261/code/dbn/umbrella.scm
- Click "Run"
Exercises
- 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 > .
- 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 a rather
empty evidence list.
- 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?
- Verify your prediction with the command
(compute-belief umb-net 1 (list (u 1 30)))
What does that last argument mean? 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."
- 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, compare
P(R2 | u1,u2) and P(R1 | u1).
- Verify your prediction by adding the evidence (u 2 30) to
your list and inquiring of rain on day two.
- How do you expect the probability of rain on day k change as we
continue to see an umbrella on days 1 to k?
- Verify your prediction by beginning to explore with some queries like
...
(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.
- 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?
- Assume our evidence is only an umbrella on the first two days. How
do you expect the following probabilities to compare?
- P(R2 | u1,u2)
- P(R3 | u1,u2)
- P(R4 | u1,u2)
- Verify your predictions.
- Compute the probability of rain given no evidence for a variety of
days. That is, P(Rk).
- How do you expect the evidence u1, u2 to impact Rk
as k becomes farther and farther from day 2?
- 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?