Written question [30 points]
Your answers to the following question should be typed
and submitted as a pdf (e.g. you can type your answers using Word and
print to pdf, or use LaTeX, or write your answers by hand
and then scan your paper).
Consider the WetGrass Bayesian network shown in Figure 14.12a in AIMA. Assume we observe
WetGrass=false.
- [6 points] Compute the exact posterior probabilities
p(Cloudy|WetGrass=false), p(Sprinkler|WetGrass=false), and
p(Rain|WetGrass=false).
- [6 points] Explain and show how to generate a sample using rejection
sampling.
- [6 points] Generate 10 samples using rejection sampling. How many
samples do you get where WetGrass=false and how many do
you have to reject? Estimate posterior probabilities for
Cloudy, Sprinkler, and Rain based on those 10
samples.
- [6 points] Explain and show how to generate a sample
using likelihood weighting
- [6 points] Generate 10 samples using likelihood
weighting. Show the weights for each sample. Estimate
posterior probabilities for Cloudy, Sprinkler, and Rain
based on those 10 samples.
To generate a random double between [0,1] in Python use the commands: "import random" and "random.uniform(0,1)"
|
Programming project [70 points]
It's time to hunt ghosts! In the past, pacmen did not fear ghosts. Ghosts feared pacmen! In this assignment, you will use the exact and approximate inference algorithms we learned about (for dynamic Bayesian networks) to locate ghosts. Please start early enough so that you can complete the assignment on time.
- You do not have to do Q6-Q7 (Joint Particle Filter)
- You must find a different partner for this programming assignment! We have an odd number of people, so one group will have 3 people
- If you're ready to get started, click here.
|