Consider a set of one-dimensional points: 6, 12, 18, 24, 30, 42, 48.
(1) Use 15, 40 as the initial centroids, and apply K-means to create two clusters.
(2) Calculate the Sum of Squared Errors (SSE) for the clustering result. (1 point) (3) Repeat (1), but use 10, 20 as the initial centroids.

Respuesta :

Answer:

1) With initial centroids 10-40, final clusters are

first cluster (6,12,18,24,30)

second cluster (42,48)

And the Sum of Squared Errors (SSE) for the clustering result is 378

2) With initial centroids 10-20, final clusters are

first cluster (6,12,18,24)  

second cluster (30,42,48)

And the Sum of Squared Errors (SSE) for the clustering result is 348

Step-by-step explanation:

K-means works as follows

  • the points will be clustered according to their distance to the centroids.
  • Then centroids are updated as the cluster means.
  • This process continues until clusters doesn't change anymore

1)  initial centroids 10-40

first cluster (6,12,18,24)  mean:15

second cluster (30,42,48) mean:40

new centroids 15-40

first cluster (6,12,18,24,30) mean:18

second cluster (42,48) mean:45

final centroids 18-45

first cluster (6,12,18,24,30) mean:18

second cluster (42,48) mean:45

Sum of Squared errors = [tex](18-6)^{2}[/tex]+[tex](18-12)^{2}[/tex]+[tex](18-18)^{2}[/tex]+[tex](18-24)^{2}[/tex]+[tex](18-30)^{2}[/tex]+[tex](45-42)^{2}[/tex]+[tex](45-48)^{2}[/tex]=378

2)initial centroids 10-20

first cluster (6,12)  mean:9

second cluster (18,24,30,42,48)  mean:32.4

new centroids 9-32.4

first cluster (6,12,18) mean:12

second cluster (24,30,42,48) mean:36

new centroids 12-36

first cluster (6,12,18,24) mean:15

second cluster (30,42,48) mean:40

final centroids 15-40

first cluster (6,12,18,24) mean:15  

second cluster (30,42,48) mean:40

Sum of Squared errors = [tex](15-6)^{2}[/tex]+[tex](15-12)^{2}[/tex]+[tex](15-18)^{2}[/tex]+[tex](15-24)^{2}[/tex]+[tex](40-30)^{2}[/tex]+[tex](40-42)^{2}[/tex]+[tex](40-48)^{2}[/tex]=348

Q&A Education