Dividing the samples into 2 clusters using K means algorithm and euclidean Distance | Big Data | Clustering

Dividing the samples into 2 clusters using K means algorithm and euclidean Distance
Dividing the samples into 2 clusters using K means algorithm and euclidean Distance | Big Data


Dividing the samples into 2 clusters using K means algorithm and euclidean Distance | Big Data
Initialize 2 clusters C1 and C2 

C1= {1}
C2= {2}
XH =160       XW = 60

A
B
centroid
C1
180
70
(180, 70)
C2
170
50
(170, 50)

For row 3
C1
[ (160  180)2 + (60 – 70)2½
= 22.36
C2
[ (160  170)2 + (60 – 50)2½
= 14.14

C2 has small value. Therefore Row 3 goes into C2

C1= {1}
C2= {2,3}
XH =175       XW = 65

A
B
centroid
C1
180
70
(180, 70)
C2
170+160/2  
50+60 /2
(165, 55)

For row 4
C1
[ (175  180)2 + (65 – 70)2½
= 7.071
C2
[ (175 165)2 + (65 – 55)2½
= 14.14
C1 has small value. Therefore Row 4 goes into C1

C1= {1,4}
C2= {2,3}
XH =182     XW = 72

A
B
centroid
C1
180+175/2
70+65/2
(177.5, 67.5)
C2
165  
55
(165, 55)

For row 5
C1
[ (182  177.5)2 + (72 – 67.5)2½
= 6.36
C2
[ (182 165)2 + (72 – 55)2½ 
= 24.04
C1 has small value. Therefore Row 5 goes into C1

C1= {1,4,5}
C2= {2,3}
XH =185     XW = 75

A
B
centroid
C1
177.5+182 /2
67.5 +72 /2
(179.75, 69.75)
C2
165  
55
(165, 55)

For row 6
C1
[ (185  179.75)2 + (75 – 69.75)2½
= 7.42
C2
[ (185 165)2 + (75 – 55)2½ 
= 28.28
C1 has small value. Therefore Row 6 goes into C1

Therefore, final answer
C1= {1,4,5,6}
C2= {2,3}