CMPT 310 Artificial Intelligence Survey. Simon Fraser University Summer Instructor: Oliver Schulte

Similar documents
Assignment 1: Probabilistic Reasoning, Maximum Likelihood, Classification

Introduction to Artificial Intelligence. Learning from Oberservations

From inductive inference to machine learning

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE MACHINE LEARNING. Santiago Ontañón

Learning from Observations. Chapter 18, Sections 1 3 1

Learning Decision Trees

CSC242: Intro to AI. Lecture 23

Learning and Neural Networks

Decision Trees. CS 341 Lectures 8/9 Dan Sheldon

Statistical Learning. Philipp Koehn. 10 November 2015

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

Chapter 18. Decision Trees and Ensemble Learning. Recall: Learning Decision Trees

CIS519: Applied Machine Learning Fall Homework 5. Due: December 10 th, 2018, 11:59 PM

Midterm, Fall 2003

Bayesian learning Probably Approximately Correct Learning

Final Exam December 12, 2017

MATH 137 : Calculus 1 for Honours Mathematics. Online Assignment #2. Introduction to Sequences

1. Courses are either tough or boring. 2. Not all courses are boring. 3. Therefore there are tough courses. (Cx, Tx, Bx, )

Machine Learning, Midterm Exam: Spring 2009 SOLUTION

Final Exam December 12, 2017

Decision Trees. None Some Full > No Yes. No Yes. No Yes. No Yes. No Yes. No Yes. No Yes. Patrons? WaitEstimate? Hungry? Alternate?

Reasoning under Uncertainty: Intro to Probability

EECS 349:Machine Learning Bryan Pardo

CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Qualifier: CS 6375 Machine Learning Spring 2015

COS402- Artificial Intelligence Fall Lecture 10: Bayesian Networks & Exact Inference

CS 5522: Artificial Intelligence II

Artificial Intelligence Bayes Nets: Independence

Probabilistic representation and reasoning

} It is non-zero, and maximized given a uniform distribution } Thus, for any distribution possible, we have:

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2013

Chemistry 883 Computational Quantum Chemistry

Introduction To Artificial Neural Networks

CMPT Machine Learning. Bayesian Learning Lecture Scribe for Week 4 Jan 30th & Feb 4th

Machine Learning. Instructor: Pranjal Awasthi

CS 188: Artificial Intelligence Fall 2008

Bayesian networks. Chapter Chapter

Topics. Bayesian Learning. What is Bayesian Learning? Objectives for Bayesian Learning

CS 188: Artificial Intelligence Fall 2009

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Bayesian Networks BY: MOHAMAD ALSABBAGH

10-701/ Machine Learning: Assignment 1

Pre-Calculus School Year:

Machine Learning (CS 419/519): M. Allen, 14 Sept. 18 made, in hopes that it will allow us to predict future decisions

MATH 345 Differential Equations

Learning from Examples

PROBABILISTIC REASONING SYSTEMS

Homework 1 Solutions Probability, Maximum Likelihood Estimation (MLE), Bayes Rule, knn

Reasoning under Uncertainty: Intro to Probability

Probabilistic Graphical Models Homework 2: Due February 24, 2014 at 4 pm

Parts 3-6 are EXAMPLES for cse634

Directed Graphical Models or Bayesian Networks

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

CS 188, Fall 2005 Solutions for Assignment 4

Department of Physics & Astronomy Trent University

FINAL EXAM: FALL 2013 CS 6375 INSTRUCTOR: VIBHAV GOGATE

Classification Algorithms

Final Exam, Fall 2002

Midterm: CS 6375 Spring 2015 Solutions

Incremental Stochastic Gradient Descent

Probabilistic representation and reasoning

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Midterm 2 V1. Introduction to Artificial Intelligence. CS 188 Spring 2015

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

CS 188: Artificial Intelligence Spring Today

CS 188: Artificial Intelligence Spring Announcements

AS 101: The Solar System (Spring 2017) Course Syllabus

Examination Artificial Intelligence Module Intelligent Interaction Design December 2014

Classification Algorithms

Bayes Nets: Independence

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

ORF 363/COS 323 Final Exam, Fall 2016

Probabilistic Graphical Models for Image Analysis - Lecture 1

Decision Trees. Ruy Luiz Milidiú

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004

Probabilistic Graphical Models and Bayesian Networks. Artificial Intelligence Bert Huang Virginia Tech

Product rule. Chain rule

Hunan University. CHEM32: Organic Chemistry

NEW RIVER COMMUNITY COLLEGE DUBLIN, VIRGINIA COURSE PLAN

CMPSCI 240: Reasoning about Uncertainty

Artificial Intelligence

CS 188: Artificial Intelligence Spring Announcements

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes.

MATH-3150H-A: Partial Differential Equation 2018WI - Peterborough Campus

CS446: Machine Learning Spring Problem Set 4

Final Exam, Spring 2006

Intelligent Systems (AI-2)

Introduction to Machine Learning Midterm Exam

San Jose State University Department of Mechanical and Aerospace Engineering ME 230, Advanced Mechanical Engineering Analysis, Fall 2015

10601 Machine Learning Assignment 7: Graphical Models

Moving Average Rules to Find. Confusion Matrix. CC283 Intelligent Problem Solving 05/11/2010. Edward Tsang (all rights reserved) 1

Inference in Bayesian networks

Reasoning Under Uncertainty: More on BNets structure and construction

Be able to define the following terms and answer basic questions about them:

Figure 1: Bayesian network for problem 1. P (A = t) = 0.3 (1) P (C = t) = 0.6 (2) Table 1: CPTs for problem 1. C P (D = t) f 0.9 t 0.

Bayesian Networks aka belief networks, probabilistic networks. Bayesian Networks aka belief networks, probabilistic networks. An Example Bayes Net

Linear Algebra. Instructor: Justin Ryan

Transcription:

CMPT 310 Artificial Intelligence Survey Simon Fraser University Summer 2017 Instructor: Oliver Schulte Assignment 3: Chapters 13, 14, 18, 20. Probabilistic Reasoning and Learning Instructions: The university policy on academic dishonesty and plagiarism (cheating) will be taken very seriously in this course. Everything submitted should be your own writing or coding. You must not let other students copy your work. On your assignment, put down your name, the number of the assignment and the number of the course. Spelling and grammar count. Group Work: Discussions of the assignment is okay, for example to understand the concepts involved. If you work in a group, put down the name of all members of your group. There should be no group submissions. Each group member should write up their own solution to show their own understanding. For the due date please see our course management server https://courses.cs.sfu.ca. The time when you upload your assignment is the official time stamp. If your assignment is late because you did not figure this out soon enough, you will lose marks according to the syllabus policy. Terminology: The questions are not self-explanatory. Even ordinary English words (e.g., rationality ) may not have their ordinary meaning in an AI context. Part of your task is to learn the AI terminology required to understand the questions. Getting Help. Check the syllabus for communication policy. You have the textbook, the lecture notes, the discussion forum, and you can ask us in office hours or class sessions. We do not provide individual email support. Handing in the Assignment. Please use the submission system on courses.cs.sfu.ca. You should post a pdf document that contains your written answers, as well as the screenshots and diagrams required. A Bayesian network in executable file format (.xml or.bif), for the power station problem. A neural network in executable file format (.xml), for the neural network construction problem.

Probabilistic Reasoning With Bayesian Networks (Chapter 13 and 14). 60 points total. Go to www.aispace.org and start the belief and decision network tool. Load the sample file File/Load Sample Problem/Simple Diagnostic Example. We will use this to test some of the basic probability laws. The AIspace tool can do many of these calculations for you, but the purpose of the exercise is to learn the principles behind the calculations. You can use the tool to check your answers, but you should compute them yourself using the probability calculus together with the conditional probabilities from the Bayesian network. Joint Probabilities. (25 points) Compute the following joint probabilities up to 6 significant digits. 1. Use the product formula of Bayes nets and the conditional probability parameters specified by AIspace to compute the probability that: all nodes are true. 2. Use the product formula of Bayes nets and the conditional probability parameters specified by Aispace to compute the probability that: all nodes are true except for Sore Throat, and that Sore Throat is false. 3. Show how can you use these two joint probabilities to compute the probability that: all nodes other than Sore Throat are true. (Where the value of Sore Throat is unspecified.) 4. Verify the product formula: P(all nodes are true) = P(Sore Throat = true all other nodes are true) x P(all other nodes are true). You may get the first conditional probability by executing a query with the tool. 5. Compute the probability that Sore Throat is true and that Fever is true. (Hint: If you use the right formula, you only need 4 conditional probabilities.) You can enter the computed probabilities in the table below. Probability to be Computed P(all nodes true) P(Sore Throat = False, all other nodes true) P(all nodes other than Sore Throat true) P(all nodes are true) = P(Sore Throat = true all other nodes are true) x P(all other nodes are true). P(Sore Throat = true, Fever = True) Your Result

Bayes Theorem. 15 points 1. (5) Use the AIspace tool to compute P(Influenza = True Wheezing = True). 2. (10) Show how you can compute the answer using Bayes theorem. You may use the tool to find the probabilities that are required for applying Bayes theorem. Verify that your calculation and the tool give the same answer up to round-off. Independence. 20 points If no evidence is observed, Influenza and Smoking are probabilistically independent. 1. (10) Prove this statement from the numerical semantics, i.e. show that the values of Influenza and Smokes are independent for all possibilities. You may use queries in the tool to do this. 2. (10) Prove this from the topological semantics, i.e. using the Markov condition that given values for its parents, a variable is probabilistically independent of all its nondescendants.

Knowledge Representation With Bayesian Networks (30 points total) In a power station, an alarm senses when a temperature gauge exceeds a given threshold. The gauge measures the temperature of the core. Using the AIspace tool, draw a Bayesian network that represents the following information about the plant. You may consider editing your Bayes net in a text editor to facilitate copying of similar entries. 1. (5 points) Create a Bayes net with the following variables (=nodes) and domains. Each domain represents a range of possible locations. Variable Domain Meaning A {T,F} alarm sounds FA {T,F} alarm is faulty FG {T,F} gauge is faulty G {Normal, High} gauge reading T {Normal, High} core temperature 2. Draw edges between the nodes and specify conditional probability tables to represent the following information. a. (6) The alarm works correctly unless it is faulty. If it is faulty, it never sounds. b. (6) If the gauge is not faulty, there is a 90% chance that it gives the correct temperature. If the gauge is faulty, there is a 10% chance that it gives the correct temperature. c. (10) Suppose the alarm and gauge are working correctly and the alarm sounds. Using calculus probability, and the various conditional probabilities in the network, calculate the probability that under these circumstances, the temperature of the core is high. You can make the following assumptions. (i) The temperature is normal 70% of the time, high 30% of the time. (ii) The gauge is faulty 10% of the time, not faulty 90% of the time. d. (3) Use the AIspace query tool to confirm your answer from c. What to Submit for this question: Everything specified in the problem, including answers and brief explanations. In addition: A loadable.xml or.bif file for your Bayesian network in part 1. A screenshot of your Bayesian network, screenshots of your CP-tables, and a screenshot of your query and the answer from AIspace.

Chapter 20. Bayesian Network Parameter Learning. 16 points total. Consider the Bayes Net from Figure 1. This Bayes net says that the value of Will Wait can be predicted from the values of Pat (Patron) and Hun (Hungry). Let D denote the subset of the data from Figure 1 comprising only the three columns Hun, Pat, Will Wait. So D is the 12x3 matrix shown below. Hun Pat Will Wait F Some T 1. (17) Based on the Maximum Likelihood method, fill in the conditional probabilities for the Bayes net structure in the table below. Some of the conditional probabilities may be undefined. Patron Hungry Will Wait Figure 1 Sample Answer, not the solution Hun P(Hun) T 0.5 F 0.5 Pat P(Pat) Some 0.3 Full 0.3 None 0.3

Hun Pat Will Wait P(WW Pat,Hun) 0.5 T Some F 0.5 F Some T 0.4 F Some F 0.6 F Full T 0.2 0.8 0.1 0.9 F None T 0.3 0.7 T None T 0.4 T None F 0.6 Your Solution Hun T F Pat Some Full None P(Hun) P(Pat) Hun Pat Will Wait P(WW P,H) T Some F F Some T F Some F F Full T F None T T None T T None F 2. (10 points) Assuming that the conditional probabilities are estimated using the maximum likelihood method from question 1, what is the data likelihood of the data set D given the Bayesian network from Figure 1? To compute this, consider only the

three variables Hun, Pat, Will Wait (see examples in lecture notes). Fill in the table below (with joint probabilities). Some of the joint probabilities may be undefined, these should be omitted from the data likelihood. Sample Answer, not the solution Hun Pat Will Wait P(WW,Pat,Hun) 0.075 0.075 F Some T 0.075 0.075 0.075 0.075 0.075 0.075 0.075 0.075 0.075 0.075 The likelihood of the dataset D is approximately 3.16*10-14. Your Answer Hun Pat Will Wait P(WW,Pat,Hun) F Some T The likelihood of the dataset D is approximately.

Chapter 18. Decision Tree Learning. 15 points total. Summary. The purpose of this assignment is to give you practice with computing expected information gain and how the ID3 algorithm uses it to construct a decision tree. Figure 1 provides data about whether a customer will wait for a table in a restaurant or not. Assume that ID3 splits first on the Pat attribute (for Patrons). Show the following for the branch Pat = Full. 1. The next attribute chosen by ID3. (3) 2. The expected information gain associated with the next attribute. There may be more than one attribute with the same information gain, finding one is sufficient. Is Hungry one of the attributes with maximum information gain? (6) 3. How you calculated the expected information gain. (6) Figure 2 Example Attributes Target Alt Bar Fri Hun Pat Price Rain Res Type Est WillWait X 1 T F F T Some $$$ F T French 0 10 T X 2 T F F T Full $ F F Thai 30 60 F X 3 F T F F Some $ F F Burger 0 10 T X 4 T F T T Full $ F F Thai 10 30 T X 5 T F T F Full $$$ F T French >60 F X 6 F T F T Some $$ T T Italian 0 10 T X 7 F T F F None $ T F Burger 0 10 F X 8 F F F T Some $$ T T Thai 0 10 T X 9 F T T F Full $ T F Burger >60 F X 10 T T T T Full $$$ F T Italian 10 30 F X 11 F F F F None $ F F Thai 0 10 F X 12 T T T T Full $ F F Burger 30 60 T

Optional Study Question Chapter 18. Neural Networks. Construct by hand a neural network for classifying Boolean inputs whose sign agrees with the product of the inputs. In other words, the output y of the neural net must satisfy the following conditions. 1. If x 1 x 2 > 0, then y>0. 2. If x 1 x 2 < 0, then y<0. The following table shows the output for Boolean inputs. Your neural network should get close to these for the four discrete Boolean inputs shown. Input x1 Input x2 Output y 1.0 1.0 1.0 1.0-1.0-1.0-1.0 1.0-1.0-1.0-1.0 1.0 Create your neural network in the UBC AIspace tool. Your neural network should have two input nodes x1 and x2 exactly one output node y any number of hidden units in any number of hidden layers that you like, including 0 hidden units. Hint: consider using different types of activation functions for different nodes.