ML0059 K-means II

K-Means is widely used for clustering. Can you discuss its main benefits as well as its disadvantages?

Answer

K-means partitions data into K clusters where each point belongs to the cluster with the nearest mean. It is computationally efficient and easy to implement, but it requires specifying the number of clusters in advance, assumes spherical clusters, and is sensitive to initialization and outliers.

(1) Simple And Efficient: Fast to compute, easy to implement, and scalable to large datasets.
(2) Unsupervised And Interpretable: Needs no labels, and the centroids are intuitive summaries of each cluster.
(3) Strong Assumptions: Works best on compact, well-separated spherical clusters; the user must fix K beforehand.
(4) Fragility: Poor initial centroids can lock in suboptimal results, outliers drag centroids, and plain Euclidean distance excludes non-numeric features.

Mathematical Formulation:
J = \sum_{i=1}^{K} \sum_{x_j \in C_i} \|x_j - \mu_i\|^2

Where:

  • K is the number of clusters; C_i the set of points in cluster i.
  • \mu_i is the centroid of cluster i; x_j a data point assigned to it.
  • J is the within-cluster sum of squared distances: the objective both steps of the algorithm drive down monotonically.
Left panel K-means succeeding on three spherical clusters, right panel K-means cutting through two crescent shaped clusters

Figure 1: The assumption made visible: on spherical, well-separated blobs (left) K-means nails the structure; on two crescents (right) its linear, centroid-based split slices through both moons: the spherical-cluster assumption failing in action.


Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *