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

Subject: Data Mining And Business Intelligence

Topic: Clustering

Difficulty: Medium

dmbi(26) • 1.5k views
ADD COMMENTlink
modified 18 months ago  • written 19 months ago by gravatar for prachi.sagar prachi.sagar70
1

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.

ADD COMMENTlink
modified 18 months ago by gravatar for Sanket Shingote Sanket Shingote270 written 18 months ago by gravatar for prachi.sagar prachi.sagar70
Please log in to add an answer.