Problem Set 8

Assigned: Apr. 10
Due: Apr. 17

Suppose that we have a data set with the following random variables for people.

Random Variables:

M: Did the two individuals ever meet, and what was the outcome?
Three possible values: 1=met and liked; 2=met and disliked; 3=never met.

C: Did the two individuals correspond?
Values: T or F.

R: Did the two publish reviews/criticisms of one another's work?
Values: 1=positive reviews; 2=negative reviews; 3=no reviews.

A: How close were the people in age?
Values: 1=less than 10 years apart; 2=at least 10 years apart.

D: How near one another did the people live?
Values: 1=same country; 2=different countries.

Suppose that you are trying to carry out classification learning where M is the classification attribute and the rest are predictive attributes. You are given the following data set:

ID A D C R M Number of instances
1. 1 2 T 1 2 8
2. 1 2 T 1 3 4
3. 1 2 T 3 2 4
4. 1 2 F 2 1 2
5. 1 2 F 3 3 2
6. 2 1 T 1 1 3
7. 2 1 T 1 2 1
8. 2 1 T 1 3 3
9. 2 2 T 1 1 12
10. 2 2 T 2 3 6
11. 2 2 T 3 1 8
12. 2 2 T 3 3 25
13. 2 2 F 1 2 6
14. 2 2 F 1 3 10
15. 2 2 F 2 2 6
(Note that "number of instances" is not an attribute; you have to imagine that in the real data set there are 8 lines of type 1, with A=1, D=2, C=T, R=4, M=2, and so on.)

Problem 1

What is the classifier returned by the 1R algorithm? How does it classify the instance A=1, D=2, C=F, R=1?

Problem 2

How does the nearest neighbors algorithm classify the instance A=1, D=2, C=F, R=1? Assume that, for a data set like this, where there are many instances equidistant from the test example, the nearest neighbors algorithm works by collecting all the instances that are at minimal distance to the new example and having them vote. Assume also that the distance between two instances is equal to the number of predictive attributes where they vary. Note particularly that the distance between R=3 and R=1 is considered the same as the distance between R=2 and R=1.

Problem 3

How does Naive Bayes classify the instance A=1, D=2, C=F, R=1?