Why is k-means typically run multiple times with different initialisations, and how is the final solution chosen?

Quick Overview

Asks why k-means is usually run several times from different starting centroids and how the final clustering is picked. Tests understanding of local minima in Lloyd's algorithm, the k-means objective and the role of smarter seeding.

Why is k-means typically run multiple times with different initialisations, and how is the final solution chosen?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why is k-means typically run multiple times with different initialisations, and how is the final solution chosen? ```hint Shape of the objective Think about whether the k-means objective has a single minimum, and whether Lloyd's two alternating steps can ever increase the cost. ``` ### What a Strong Answer Covers - Why Lloyd's algorithm converges to a local minimum that depends on the starting centroids, with a concrete bad configuration. - The criterion used to pick among runs and why it is valid only for a fixed k. - How k-means++ seeding changes the need for restarts. - What disagreement between runs says about the data or the choice of k. ### Follow-up Questions - How does k-means++ choose its initial centroids? - Why can't you use inertia to choose k, and what would you use instead? - On a dataset of 100 million points, how would you keep multiple restarts affordable? - Two runs reach nearly the same inertia but produce different partitions. How would you measure how different they are?

Overview: Asks why k-means is usually run several times from different starting centroids and how the final clustering is picked. Tests understanding of local minima in Lloyd's algorithm, the k-means objective and the role of smarter seeding.

Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Why is k-means typically run multiple times with different initialisations, and how is the final solution chosen?

What a Strong Answer Covers Guidance

  • Why Lloyd's algorithm converges to a local minimum that depends on the starting centroids, with a concrete bad configuration.
  • The criterion used to pick among runs and why it is valid only for a fixed k.
  • How k-means++ seeding changes the need for restarts.
  • What disagreement between runs says about the data or the choice of k.

Follow-up Questions Guidance

  • How does k-means++ choose its initial centroids?
  • Why can't you use inertia to choose k, and what would you use instead?
  • On a dataset of 100 million points, how would you keep multiple restarts affordable?
  • Two runs reach nearly the same inertia but produce different partitions. How would you measure how different they are?