What is k-means++ initialisation, and for the 1-D points with , if the first centre chosen is 0, what is the probability that each remaining point becomes the second centre?
Unsupervised learning, Clustering
Level L2 Elementary. Length Short. Nature Th+Mat Both.
What's being asked
Whether you know the sampling rule and can show with numbers why it spreads the centres out.
Key idea
Each new centre is drawn at random with probability proportional to , the squared distance from to its nearest centre chosen so far: . Far-away points are therefore much more likely to be picked.
Steps
- Describe the algorithm. Pick the first centre uniformly at random. Then, until there are centres, compute for every point and draw the next centre with probability proportional to . Finally run ordinary k-means from these centres.
- With the centre at 0, the squared distances of the points are . Their sum is 226.
- Divide by the sum: , , and .
- Interpret: the second centre lands in the far group with probability about 0.98, against if we picked uniformly among the other four points. So the two natural groups each get a centre.
- State the guarantee: the k-means++ starting centres already give an expected objective within a factor of the best possible.
Common mistakes
- Using instead of .
- Always picking the farthest point. That is a different method (farthest-first traversal) and is very sensitive to outliers.
How long your answer should be
3–4 sentences plus the four probabilities.
Last checked on 4 December 2026.
Read this
Previous in Unsupervised learning: Does k-means always converge, and does it find the global optimum?
Next in Unsupervised learning: Five 1-D points are , , , and . With agglomerative clustering, what merges and merge heights do (a) single linkage and (b) complete linkage give, and how do the two linkages differ in practice?