

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Hand in solutions to the problems below, either neatly written by hand or formatted using a word processor or text editor. Show your work as clearly as possible.
Fever = patient has fever Cough = patient has cough Breathing = patient has difficulty breathing HumanContact = patient had recent contact with human infected with avian influenza AvianContact = patient had recent contact with bird infected with avian influenza
Consider the training set S given below. In each of the six training examples, true or false values for each of the five attributes are given, as well as the correct classification for each example.
Patient Fever Cough Breathing HumanContact AvianContact AvianInfluenza P1 T T F F F F P2 T T T T F T P3 F F T F T F P4 F T T F T T P5 T T F F T T P6 T F F T T F
(a) Give the information gain, Gain(S, A), for each attribute A with respect to the training set S. Show your work clearly.
(b) Find a decision tree that ID3 would return, by tracing the steps of ID by hand, using information gain as the splitting criterion. (If there is a tie for highest information gain, choose one of the highest-gain attributes at ran- dom.) Include your work that shows how you traced the steps of ID3. Verify that your resulting tree is consistent with the training data.
(c) Compute the gain ratio of the attributes with highest and second highest information gain (with respect to the original training set S). Again, break ties by choosing randomly among the tied attributes. Show your work. If ID 3 had used gain ratio instead of information gain in part (b) above, would the root of the tree have been a different attribute?
(d) Give an example of a new attribute for this problem that would have higher information gain than the highest one you found in part (a), but would not be useful for classifying unseen test data.
(b) What is the equation of the separation line defined by the perceptron in 2(a), given the values for weights and bias that you gave? Plot this line and show that it correctly separates the two classes for the function (x 1 AND x 2 ) OR (NOT x 2 ).
(c) Now take the same perceptron, weights, and bias that you gave in in 2(a) above, and suppose that it is given the following instance ~x = (− 1 , 1), with target output t = 1. What will the weights and bias be after an application of the perceptron learning rule? (Assume the learning rate is 1 and the mo- mentum is 0.)