2081 4

CSC420 · 2081 · 5 marks

Using k-means++ algorithm and Euclidean distance, find the initial 3 cluster centroids from A1 = (3, 11), A2 = (3, 6), A3 = (9, 5), A4 = (6, 9), A6 = (7, 5), A7 = (2, 3), A8 = (5, 10). Choose (3, 11) as one of the initial centroids.

Using k-means++ algorithm and Euclidean distance, find the initial 3 cluster centroids from A1 = (3, 11), A2 = (3, 6), A3 = (9, 5), A4 = (6, 9), A6 = (7, 5), A7 = (2, 3), A8 = (5, 10). Choose (3, 11) as one of the initial centroids. [5]

Data Warehousing and Data MiningChapter 7: Cluster AnalysisClustering techniquesNumerical: K-means++ centroids

K-Means++ Initial Centroid Selection

Given

Data points:

PointCoordinates
A1(3, 11)
A2(3, 6)
A3(9, 5)
A4(6, 9)
A6(7, 5)
A7(2, 3)
A8(5, 10)

Number of clusters: $k = 3$ First centroid (given): $C_1 = (3, 11)$

Solution

K-Means++ Rule

  1. First centroid is fixed as $C_1 = (3,11)$.
  2. For each point compute $D^2$ = squared Euclidean distance to the nearest chosen centroid.
  3. Choose the point with the largest $D^2$ (highest selection probability) as the next centroid.

Selecting $C_2$: distances to $C_1 = (3,11)$

$$D^2 = (x-3)^2 + (y-11)^2$$

PointCalculation$D^2$
A2 (3,6)$0 + 25$25
A3 (9,5)$36 + 36$72
A4 (6,9)$9 + 4$13
A6 (7,5)$16 + 36$52
A7 (2,3)$1 + 64$65
A8 (5,10)$4 + 1$5

Total $= 25+72+13+52+65+5 = 232$

Probability $= D^2 / 232$:

PointP
A20.108
A30.310
A60.224
A70.280
A40.056
A80.022

Largest $D^2$ is A3 (72).

$$\boxed{C_2 = (9, 5)}$$

Selecting $C_3$: nearest distance to ${C_1, C_2}$

$D^2(C_2)$ with $C_2 = (9,5)$:

Point$D^2(C_1)$$D^2(C_2)$$\min$
A2 (3,6)25$36+1=37$25
A4 (6,9)13$9+16=25$13
A6 (7,5)52$4+0=4$4
A7 (2,3)65$49+4=53$53
A8 (5,10)5$16+25=41$5

Total $= 25+13+4+53+5 = 100$

Probability $= \min D^2 / 100$:

PointP
A20.25
A40.13
A60.04
A70.53
A80.05

Largest $\min D^2$ is A7 (53).

$$\boxed{C_3 = (2, 3)}$$

Final Result

The 3 initial centroids chosen by K-Means++ are:

CentroidCoordinates
$C_1$(3, 11)
$C_2$(9, 5)
$C_3$(2, 3)

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.