Professional Documents
Culture Documents
Iteration 2:
(2,10) (6,6) (1.5,3.5)
Point Dist Mean 1 Dist Mean 2 Dist Mean 3 Cluster
A1 (2, 10) 0 8 7 1
A2 (2, 5) 5 5 2 3
A3 (8, 4) 12 4 7 2
A4 (5, 8) 5 3 8 2
A5 (7, 5) 10 2 7 2
A6 (6, 4) 10 2 5 2
A7 (1, 2) 9 9 2 3
A8 (4, 9) 3 5 8 1
Next, we need to re-compute the new cluster centers (means). We do so, by taking
the mean of all points in each cluster.
For Cluster 1, we have(( 2+4)/2,(10+9)/2)=(3,9.5)
For Cluster 2, we have ( (8+5+7+6)/4, (4+8+5+4)/4 ) = (6.5, 5.25)
For Cluster 3, we have ( (2+1)/2, (5+2)/2 ) = (1.5, 3.5)
Now cluster centers are: A1 (3, 9.5), A4 (6.5, 5.25) and A7 (1.5, 3.5).
Iteration 3:
(3,9.5) (6.5,5.25) (1.5,3.5)
Point Dist Mean 1 Dist Mean 2 Dist Mean 3 Cluster
A1 (2, 10) 1.5 9.25 7 1
A2 (2, 5) 5.5 4.75 2 3
A3 (8, 4) 9.5 2.75 7 2
A4 (5, 8) 3.5 4.25 8 1
A5 (7, 5) 8.5 .75 7 2
A6 (6, 4) 8.5 1.75 5.5 2
A7 (1, 2) 9.5 8.75 2 3
A8 (4, 9) 1.5 6.25 5.5 1
Assume k=2
Assume initial centroid 1(1.0, 1.0), 4(5.0, 7.0)
Individual (1.0,1.0) (5.0,7.0) cluster
1. 0 7.21 1
2. 1.12 6.10 1
3. 3.61 3.61 1
4. 7.21 0 2
5. 4.72 2.5 2
6. 5.31 2.06 2
7. 4.30 2.92 2
Distance between (1.0, 1.0) and individual 2(1.5, 2.0) =√|1.0-1.5| 2+|1.0-2.0|
2
=1.118
Distance between (3.5 ,4.5) and (1.0, 1.0) =√|3.5-1.0| 2+|4.5-1.0|2=4.3
Thus, we obtain two clusters containing :{ 1, 2, and 3} and {4, 5, 6, 7}.
Next, we need to re-compute the new cluster centers (means). We do so, by taking
the mean of all points in each cluster.
For Cluster 1, we have(( 1.0+1.5+3.0)/3,(1.0+2.0+4.0)/3)=(1.83,2.33)
For Cluster 2, we have ( (5.0+3.5+4.5+3.5)/4, (7.0+5.0+5.0+4.5)/4 ) =
(4.12,5.38)
Now using these centroids we compute the Euclidean distance of each
object, as shown in table.