K-means Clustering

Solved Problem

Use k-means clustering & partition into 2 clusters

2,4,10,12,3,20,30,11,252, 4, 10, 12, 3, 20, 30, 11, 25

(1) Randomly partition the data set & find cluster mean or select some mean

Let m1=4,m2=12m_1 = 4,\qquad m_2 = 12

Form clusters:

k1={2,3,4}k_1 = \{2, 3, 4\}

k2={10,11,12,20,25,30}k_2 = \{10, 11, 12, 20, 25, 30\}

(a) Find mean:

m1=2+3+43=3m_1 = \dfrac{2+3+4}{3} = 3

m2=18m_2 = 18

Iteration 2: Assign the points again

k1={2,3,4,10}k_1 = \{2, 3, 4, 10\}

m1=2+3+4+104=4.75≈5m_1 = \dfrac{2+3+4+10}{4} = 4.75 \approx 5

k2={11,12,20,25,30}k_2 = \{11, 12, 20, 25, 30\}

m2=11+12+20+25+305=19.6≈20m_2 = \dfrac{11+12+20+25+30}{5} = 19.6 \approx 20

Iteration 3:

k1={2,3,4,10,11,12}k_1 = \{2, 3, 4, 10, 11, 12\}

m1=7m_1 = 7

k2={20,25,30}k_2 = \{20, 25, 30\}

m2=25m_2 = 25

Iteration: 4

k1={2,3,4,10,11,12}k_1 = \{2, 3, 4, 10, 11, 12\}

m1=7m_1 = 7

k2={20,25,30}k_2 = \{20, 25, 30\}

m2=25m_2 = 25

No Change in the mean

∴\therefore The 2 clusters are

k1={2,3,4,10,11,12}k_1 = \{2, 3, 4, 10, 11, 12\}

k2={20,25,30}k_2 = \{20, 25, 30\}