In: Advanced Math
Please someone assist me with the following problem please!
5. K-nearest-neighbor
Given the training data set shown below
Sample |
x |
Y |
Label? |
1 |
1 |
5 |
Yes |
2 |
2 |
4 |
Yes |
3 |
3 |
2 |
No |
4 |
0 |
1 |
Yes |
5 |
5 |
5 |
No |
6 |
4 |
4 |
No |
Predict the label for a sample, [2, 2] by using
1) 1-nearest neighbor. Show steps.
2) 3-nearest neighbor. Show steps.
6. K-means
Given six data points,
X1: (1, 1)
X2: (5, 5)
X3: (1, 2)
X4: (4, 4)
X5: (2, 2)
X6: (4, 5)
1) Plot all the points on a two-dimensional plane.
2) Supposing initial centroids are (5, 3) and (2, 4), group six points into two clusters by using L1 norm distance measure. Show steps.