Professional Documents
Culture Documents
Cluster
Cluster
Solution: -
Iteration 1
First we list all points in the first column of the table above. The initial cluster centers – means, are
(3, 11), (6, 9) and (2, 3) - chosen randomly. Next, we will calculate the distance from the first point
(3, 11) to each of the three means, by using the distance function:
point mean1
x1, y1 x2, y2
=0+0
=0
point mean2
x1, y1 x2, y2
= |6 – 3| + |9 – 11|
=3+2
=5
point mean3
x1, y1 x2, y2
= |2 – 3| + |3 – 11|
=1+8
=9
So, which cluster should the point (3, 11) be placed in? The one, where the point has the shortest
distance to the mean – that is mean 1 (cluster 1), since the distance is 0.
(3, 11)
So, we go to the second point (3, 6) and we will calculate the distance to each of the three means,
by using the distance function:
point mean1
x1, y1 x2, y2
=0+5
=5
point mean2
x1, y1 x2, y2
(3, 6) (6, 9)
= |6 – 3| + |9 – 6|
=3+3
=6
point mean3
x1, y1 x2, y2
(3, 6) (2, 3)
= |2 – 3| + |3 – 6|
=1+3
=4
So, which cluster should the point (3, 6) be placed in? The one, where the point has the shortest
distance to the mean – that is mean 3 (cluster 3).
(3,11) (6,9) (2,3)
Point Dist Mean Dist Mean Dist Mean Cluster
M1 3 11 (3,11) 0 5 9 1
M2 3 6 (3,6) 5 6 4 3
M3 9 5 (9,5) 12 7 9 2
M4 6 9 (6,9) 5 0 10 2
M5 8 6 (8,6) 10 5 9 2
M6 7 5 (7,5) 10 5 7 2
M7 2 3 (2,3) 9 10 0 3
M8 5 10 (5,10) 3 2 10 2
(6, 9) (2, 3)
(8, 6)
(7, 5)
(5, 10)