hw1_soln

# hw1_soln - CS 478 Machine Learning Homework 1 Suggested...

This preview shows pages 1–4. Sign up to view the full content.

CS 478 Machine Learning: Homework 1 Suggested Solutions 1 kNN Decision Boundaries (a) (b) (c) It would be classiﬁed as ‘circle’. Adding one point is enough, say a ‘cross’ at exactly (1,-1). (d) It would be classiﬁed as ‘circle’. The ﬁve closest points are (0 , 0) , (2 , 0) , (1 , - 3) , (3 , - 2) , (0 , 1). The forth and ﬁfth closest point (3 , - 2) , (0 , 1) are equidistant to (1 , - 1), and of dif- ferent classes. So if we break ties by picking crosses (the point (0,1)), then only one point is needed, say a cross at (1,-1). Otherwise if we break tie by picking the circle then we need at least two points (two crosses at (1,-1), say). 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 kNN Implementation (a) Always predict the majority class. The baseline accuracy for the Wine dataset is 0.3077, while that for the Liver dataset is 0.6145. (b) See the plots below: The best value of k for the Wine dataset is 7, while that for the Liver dataset is 7 or 13. (c) It might be useful because the input features could have been measured in diﬀer- ent units of varying scales, say, some measured in centimetres while some measured in metres. Assuming those features have similar importance towards classiﬁcation, the kNN algorithm would give more weight to features with larger range since they contribute more to the Euclidean distance. Rescaling the features with mean and standard deviation could eliminate some of these undesirable eﬀects. 2
(d) See plots below: Standardization improves the performance on the Wine dataset across a whole range of values of k while harms the performance on the Liver dataset. (e)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/02/2008 for the course CS 478 taught by Professor Joachims during the Spring '08 term at Cornell.

### Page1 / 7

hw1_soln - CS 478 Machine Learning Homework 1 Suggested...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online