GATE DA 2024 · k-Means & k-Medoid Clustering

NAT · 2 marks · Problem ML-CLUS-0011

Consider a 1-dimensional dataset \(X = \{2, 3, 4, 10, 11, 12, 20, 21, 22\}\). We cluster these points into two clusters using the standard 1D \(2\)-means clustering algorithm. The initial centroids are chosen as \(\mu_1 = 3\) and \(\mu_2 = 21\). After the algorithm converges, let the final centroids be \(c_1\) and \(c_2\) with \(c_1 < c_2\). The value of \(c_1\) is .

Numerical answer (NAT).

Solve it on GATE DA practice →More Unsupervised Learning — Clustering problems

Show the worked solution\[\boxed{\text{assign each point to the nearer centroid, then move each centroid to the mean of its cluster}}\]Assignment with \(\mu_1=3,\ \mu_2=21\): the boundary is the midpoint \(12\). The points \(2,3,4,10,11\) go to cluster 1 and \(20,21,22\) to cluster 2; the point \(12\) is equidistant (\(9\) from each centroid).If \(12\) goes to cluster 1: \(\mu_1=\dfrac{2+3+4+10+11+12}{6}=7\), \(\mu_2=\dfrac{20+21+22}{3}=21\).If \(12\) goes to cluster 2: \(\mu_1=\dfrac{30}{5}=6\), \(\mu_2=\dfrac{75}{4}=18.75\). The next boundary is \(12.375\), so \(12\) now joins cluster 1, and the centroids become \(7\) and \(21\).With \(\mu_1=7,\ \mu_2=21\) the boundary is \(14\): the clusters \(\{2,3,4,10,11,12\}\) and \(\{20,21,22\}\) do not change, so the algorithm has converged with \(c_1=7\), \(c_2=21\) whichever way the tie is broken.Answer: 7

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com