30.12.2013 Views

Assignment 4

Assignment 4

Assignment 4

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CMPT 310 - Artificial Intelligence Survey<br />

<strong>Assignment</strong> 4<br />

Due date: Friday, April 12, 2013<br />

J.P. Delgrande<br />

10 marks March 25, 2013<br />

Important Note: Students must work individually on this, and other CMPT 310, assignments.<br />

You may not discuss the specific questions in this assignment, nor their solutions<br />

with any other student. You may not provide or use any solution, in whole or in part, to or<br />

by another student.<br />

You are encouraged to discuss the general concepts involved in the questions in the context<br />

of completely different problems. If you are in doubt as to what constitutes acceptable<br />

discussion, please ask!<br />

1. (5 marks) Consider the following example:<br />

Aching elbows and aching hands may be the result of arthritis. Arthritis is<br />

also a possible cause of tennis elbow, which in turn may cause aching elbows.<br />

Dishpan hands may also cause aching hands.<br />

(a) Represent these facts in a belief network. Let ar stand for “arthritis”, ah for<br />

“aching hands”, ae for “aching elbow”, te for “tennis elbow”, and dh for “dishpan<br />

hands”.<br />

(b) Suppose the following probabilities are given:<br />

P r(ar) = .001 P r(dh) = .01<br />

P r(ah|ar, dh) = P r(ae|ar, te) = .1<br />

P r(ah|ar, ¬dh) = P r(ae|ar, ¬te) = .99<br />

P r(ah|¬ar, dh) = P r(ae|¬ar, te) = .99<br />

P r(ah|¬ar, ¬dh) = P r(ae|¬ar, ¬te) = .00001<br />

P r(te|ar) = .0001 P r(te|¬ar) = .01<br />

Assume that we are interested in determining whether it is more likely that a<br />

patient has arthritis, tennis elbow, or dishpan hands.<br />

i. With no observations at all, which of the three is most likely a priori?<br />

ii. If we observe that the patient has aching elbows, which is now the most likely?<br />

iii. If we observe that the patient has both aching hands and elbows, which is<br />

the most likely?<br />

1


iv. How would your rankings change if there were no causal connection between<br />

tennis elbow and arthritis, where for example<br />

P r(te|ar) = P r(te|¬ar) = .0099<br />

instead of the two values given above?<br />

Please show all of hyour calculations for full marks.<br />

2. (5 marks) Consider an electronics outfit that wants to figure out hom much time to<br />

spend with a customer. Relevant attributes are the person’s age, income, whether they<br />

are a student or not, and their credit rating. The target attribute is whether they will<br />

buy something. You are given the following training data.<br />

Id Age Income Student Rating Purchase<br />

1 < 25 high no ok no<br />

2 < 25 high no good no<br />

3 25 . . . 40 high no ok yes<br />

4 > 40 med no ok yes<br />

5 > 40 low yes ok yes<br />

6 > 40 low yes good no<br />

7 25 . . . 40 low yes good yes<br />

8 < 25 med no ok no<br />

9 < 25 low yes ok yes<br />

10 > 40 med yes ok yes<br />

11 < 25 med yes good yes<br />

12 25 . . . 40 med no good yes<br />

13 25 . . . 40 high yes ok yes<br />

14 > 40 med no good no<br />

The goal is to predict whether a customer will make a purchase, based on the other<br />

attributes.<br />

Construct the optimal decision tree that corresponds to this data. Please show and<br />

explain all steps.<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!