0
5.3kviews
What is clustering? Explain k-means clustering algorithm. Suppose the data for Clustering- (2,4,10,12,3,20,11,25)

Subject: Data Mining And Business Intelligence

Topic: Clustering

Difficulty: Medium

1 Answer
1
607views

Step 1:Randomly assign means

         m1=3, m2=4

Step 2:Calculate the distance of the objects from the mean and assign the objects to the cluster with minimum distance

         k1={2,3}    k2={4,10,12,20,30,11,25}

Step 3:Reassing means

         m1=(2+3/2)    m2=(4+10+12+20+30+11+25/2) 
         m1=2.5, m2=16

Step 4:Calculate distance and assign clusters

        k1={2,3,4}   k2={10,12,20,30,11,25}

Step 5: Reassing means

        m1=3,m2=18

Step 6: Calculate distance and assign clusters

        k1={2,3,4,10}  k2={12,20,30,11,25}

Step 7: Reassing means

         m1=4.75 ,   m2=19.6

Step 8:Calculate distance and assign clusters

         k1={2,3,4,10,11,12}  k2={20,30,25}

Step 9:Reassing means

        m1=7 ,   m2=25

Step 10:Calculate distance and assign clusters

       **k1={2,3,4,10,11,12}  k2={20,30,25}**

Repeat the steps till you get same clusters

As clusters in step 8 and step 10 are same ,these are the final clusters.

Please log in to add an answer.