Why does k-means fail when clusters are non-convex or concentric?

Quick Overview

Explain why k-means breaks down on non-convex clusters such as interleaved moons and on concentric rings. It tests your understanding of Voronoi cells, what the sum of squared errors objective rewards, and which clustering methods handle connected or ring-shaped structure.

Why does k-means fail when clusters are non-convex or concentric?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why does k-means fail when clusters are non-convex or concentric? Think of two standard examples: two interleaved half-moons, and two concentric rings in the plane. Explain what k-means produces on each, why, and which methods would work instead. ```hint Look at the shape of one cluster Each point goes to its nearest centroid. Work out what region of space ends up assigned to one centroid, and what shape that region must have. ``` ```hint Check the objective itself Compare the sum of squared distances for the partition you want with that of a straight cut through the data. Ask whether a better optimizer would help. ``` ### What a Strong Answer Covers - The shape of the region a single k-means cluster can occupy, and where that shape comes from. - What happens specifically on concentric rings and on interleaved moons. - Whether the failure comes from the k-means objective or from the optimizer, and what that means for initialization and restarts. - Methods that handle these shapes and the idea each one relies on. ### Follow-up Questions - Would a Gaussian mixture model with full covariance matrices separate the two rings? Why or why not? - How would you choose `eps` and `min_samples` for DBSCAN, and what goes wrong when clusters have different densities? - How does the choice of similarity graph in spectral clustering affect the result on two moons? - If the dataset is too large for spectral or density-based methods, how could you still recover non-convex clusters with k-means as one step?

Overview: Explain why k-means breaks down on non-convex clusters such as interleaved moons and on concentric rings. It tests your understanding of Voronoi cells, what the sum of squared errors objective rewards, and which clustering methods handle connected or ring-shaped structure.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why does k-means fail when clusters are non-convex or concentric?

Think of two standard examples: two interleaved half-moons, and two concentric rings in the plane. Explain what k-means produces on each, why, and which methods would work instead.

What a Strong Answer Covers Guidance

  • The shape of the region a single k-means cluster can occupy, and where that shape comes from.
  • What happens specifically on concentric rings and on interleaved moons.
  • Whether the failure comes from the k-means objective or from the optimizer, and what that means for initialization and restarts.
  • Methods that handle these shapes and the idea each one relies on.

Follow-up Questions Guidance

  • Would a Gaussian mixture model with full covariance matrices separate the two rings? Why or why not?
  • How would you choose eps and min_samples for DBSCAN, and what goes wrong when clusters have different densities?
  • How does the choice of similarity graph in spectral clustering affect the result on two moons?
  • If the dataset is too large for spectral or density-based methods, how could you still recover non-convex clusters with k-means as one step?