FIT5047 Semester 1, 2017 Bayesian Networks Laboratory FIT5047 { Bayesian Networks Laboratory (7.5%) Question 1: Bayesian Networks, Netica ( 12 + 1  4 + 2  2 + 3 + 1  10 + 7 = 40 marks ) Expand the Bayes Net you developed in the BN tutorial (available on moodle under the name SmokeAlarm.dne ) to include three more events: Smoke (you can see smoke in your apartment), Evacuation (your apartment building is evacuated), and Report (the local newspaper writes a report about the evacuation of your apartment). The probability of smoke when there is re is 0.9, the probability of smoke when there is no re is 0.01. When your apartment building has a re alarm, there is a 0.88 probability that there will be an evacuation, but there is never an evacuation when there is no re alarm. If there is an evacuation, there is a 0.75 probability that the newspaper will write a report on it, and if there is no evacuation there is a 0.99 probability that the newspaper won't report it. (a) Add the necessary nodes and edges to your BN, and input the corresponding conditional probability tables. Justify your expanded network and CPTs. A BN without justi ca- tion will receive no marks. (b) Use Netica on the expanded BN to answer the following questions: i. What is the marginal probability that your smoke detector has been tampered with? ii. What is the marginal probability that there will be a news report tomorrow? iii. Let's assume that you have observed that there is smoke in your apartment. What is the posterior probability that there will be a news report tomorrow? iv. Let's assume that you have observed that there was no re, and that there was a news report about your apartment. What is the posterior probability that your smoke detector has been tampered with? v. Let's assume that you have observed that there is no smoke in your apartment. What is the posterior probability that your smoke detector has been tampered with? What conditional independence property could help you here? vi. Let's assume that you have observed that there has been a news report about your apartment, and there is no smoke in your apartment. What is the posterior probability that your smoke detector has been tampered with? Given that the news report was observed, why does observing the absence of smoke a ect your belief of whether or not your smoke alarm was tampered with? vii. Let's assume that you have observed that there was no re, that there was a news report about your apartment, and that there is smoke in your apartment. What is the posterior probability that your smoke detector has been tampered with? How does observing whether or not there is smoke a ect your belief of whether or not your smoke detector has been tampered with? Why? 1 (c) Hypothesize the (conditional) independence properties of the statements below. Use Netica to check them, and state whether they are true or false. Brie y explain your answers. Answers without explanations will receive no marks. Note: The graph structure informs us about dependences between variables, but there may be additional dependences based on the values of the conditional probability tables. Tampering ?? Evacuation Tampering ?? Evacuation j Alarm Tampering ?? Evacuation j Smoke Tampering ?? Fire Tampering ?? Fire j Alarm Alarm ?? Smoke Smoke ?? Report Smoke ?? Tampering Smoke ?? Tampering j Alarm Smoke ?? Tampering j Report (d) Based on your BN, construct a Bayesian Decision Network (BDN) that decides whether the building should be evacuated. That is, instead of having an Evacuation chance node, you should have a decision node that determines whether you should evacuate the building. Specify and justify the information links and the values in the utility node. BDNs without justi cations will receive no marks. Question 2: Bayesian Networks, Netica ( 17 + 4 + 12 + 7 = 40 marks ) It is coming to the end of winter and Ron is trying to model the factors that a ect the state of his lawn. The lawn is currently looking pretty sad, as his children spent all last summer playing backyard cricket, and have worn several bare patches. However, the area has been in drought for the previous 12 months. If there is no rain before summer, it will be very hard to get the new lawn to grow, and Ron will waste a lot of time and money. Furthermore, if there is no rain, the authorities could increase the level of water restrictions, meaning that Ron will be unable to water his lawn at all. This would make the chances of his lawn surviving very small indeed. To further complicate the matter, there is a small chance that the area could experience another frost before the weather warms up, which also could damage the new lawn. (a) Design a BN using the nodes: Rain, LawnGrow, WaterRestrictions and Frost . Justify your design. A BN without justi cation will receive no marks. (b) Inspect your BN and report on any value assignments that will cause d-separation be- tween any sets of nodes. Explain why this is the case. Value assignments without explanations will receive no marks. (c) Quantify the relationships in the network by adding numbers for the CPTs. Justify the numbers in your CPTs. CPTs without justi cation will receive no marks. (d) Using Netica, demonstrate the workings of your BN by determining the probability of the lawn growing in the following cases. 1. There is no evidence. 2. There is no rain, and water restrictions have been applied. Explain your results compared to item 1. 3. There is frost, but it has rained. Explain your results compared to item 1. 2 Question 3: D-separation ( 9 + 5 + 6 = 20 marks ) Consider the following Bayesian Network called rental2.dne (available on moodle). (a) List the conditions under which you will be able to propagate evidence from Income to Rent charged . That is, which nodes need to be instantiated or uninstantiated so that evidence can be propagated from Income to Rent charged . Explain why this is the case. (b) Repeat question (a) for propagating evidence from Happiness to Property area ( with ex- planations ). (c) Repeat the above questions under the assumption that there is also an arc from Prop- erty area to Tenant (the corresponding BN, rental3.dne , is available on moodle). Com- pare your results with those obtained above. Submission instructions: 1. You are allowed to do the lab with one friend. 2. At the end of the lab, upload your .dne and .neta les to moodle in a zip le named BNlab- StudentID .zip, where StudentID is your Student ID number. If you have done the lab with a friend, include his/her name and yours at the top of the submission { MAKE ONLY ONE SUBMISSION FOR BOTH OF YOU. 3. Upload your report, with a copy of the cover sheet, to moodle 48 hours after the completion of your lab at the latest . For example, if your lab is Monday night, you should upload your report by Wednesday 8 pm at the latest. Important:  Your report should include screenshots of the Netica networks (BN and BDN) under the di erent conditions, and representations of the CPTs and utility table.  You may be interviewed about your work in order to determine your mark for this lab. Late submission policy: 10% of the maximum mark will be deducted for every day a submission is late. 3