0
13kviews
Use K-means algorithm to create 3-clusters for given set of values. {2, 3, 6, 8, 9, 15, 18, 22}
1 Answer
1
1.7kviews
  1. 2,3,6,8,9,15,18,22 ->break into 3 clusters

    K1 = 2,8,18 mean: m1 = 9.3

    K2 = 3,9,22 mean : m2 = 11.3

    K3 = 6,15 mean : m3 = 10.5

    Re-assign :

    K1 = 2,3,6,8,9 mean: m1 = 5.6

    K2 = mean : m2 = 0

    K3 = 15,18,22 mean : m3 = 18.3

    Re-assign :

    K1 = 3,6,8,9 mean: m1 = 6.5

    K2 = 2 mean : m2 = 2

    K3 = 15,18,22 mean : m3 = 18.3

    Re-assign :

    K1 = 6,8,9 mean: m1 = 7.5

    K2 = 2,3 mean : m2 = 2.5

    K3 = 15,18,22 mean : m3 = 18.3

    Re-assign :

    K1 = 6,8,9 mean: m1 = 7.5

    K2 = 2,3 mean : m2 = 2.5

    K3 = 15,18,22 mean : m3 = 18.3

Last two groups are same. So finally we got 3 clusters

Cluster1 = {6,8,9} Cluster2 = {2,3} Cluster3 = {15,18,22}

Please log in to add an answer.