question archive Solve the below question, with R programming code: and show input and output : Given the matrix X whose rows represent different data points, you are asked to perform a k-means clustering on this dataset using the Euclidean distance as the distance function
Subject:Computer SciencePrice: Bought3
Solve the below question, with R programming code: and show input and output :
Given the matrix X whose rows represent different data points, you are asked to perform a k-means clustering on this dataset using the Euclidean distance as the distance function. Here k is chosen as 3. The
Euclidean distance d between a vector x and a vector y is defined as Eculidian Distance. The centers of 3 clusters were initialized as µ1 = (6.2, 3.2) (red),
µ2 = (6.6, 3.7) (green), µ3 = (6.5, 3.0) (blue).
X =
5.9 3.2
4.6 2.9
6.2 2.8
4.7 3.2
5.5 4.2
5.0 3.0
4.9 3.1
6.7 3.1
5.1 3.8
6.0 3.0
1. What's the center of the first cluster (red) after one iteration? (Answer in the format of [x1, x2], round
your results to three decimal places.