ComS 472/572: Principles of Artificial Intelligence
Department of Computer Science
Iowa State University
 


Lab 2

Due: Friday November 11, 2011 11:00am.

In this assignment, you will use a Bayesian network software to solve some problems.

Problem: Consider a cow that may be infected with a disease that can possibly be detected by a milk test which has a false positive of  5% and a false negative of 1%. The test is performed on seven consecutive days, leading to seven outcomes. We want to determine the state of the cow's infection over these days given the test outcomes. Assume that the prior probability of an infection on day one is 0.1%, and that the state of infection at a given day depends only on its state at the previous day, such that the probability that an infection would persist to the next day is 80%, while the probability of a new infection is 0.2%.

  1. Given that the test outcomes are: positive, positive, negative, positive, positive, negative, negative,
    1. What is the probability that the cow is infected in day k, for k from one to seven?
    2. What is the most likely states of the cow's infection over the seven days?
    3. What is the most likely states of the cow's infection over the first five days?
  2. Answer the above questions given that the test outcomes are: negative, positive, positive, negative, positive, negative, negative.

Tasks

  1. Download the Bayesian network software tool SamIam: Windows i386 release, Readme. For online help and downloading other versions such as Linux, Mac, Solaris etc. please visit http://reasoning.cs.ucla.edu/samiam/.
  2. Construct a Bayesian network in SamIam for solving the above problem. Save the Bayesian network file as Cow.net.
  3. Describe a corresponding query for solving each problem and solve the queries using SamIam.  Note that Shenoy-Shafer and Hugin algorithms are two variants of join tree algorithm.

What to Turn In

Turn in via email to the TA a compressed file (.zip .rar or .tar.gz) containing the following:
  1. The file Answer.txt containing queries and answers to the queries.
  2. The file Cow.net.

Also turn in a hardcopy of the file Answer.txt  in class on November 11, 2011 (or to Sanghack Lee's mailbox in  B1 Atanasoff on the basement floor before class). Note that the electronic items must still be submitted by 11:00 a.m. and should match the hardcopies. You should receive email confirmation of your submitted file at 11:15 a.m. If you don't receive such email, there was a problem with the submission and you should immediately contact the TA for help (via email).