Machine Learning, FoundationsLesson 64 of 92

Module 7 · Learning without labels, and learning a representation

Choosing k, and why the elbow rarely helps

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 2 of 10 in this chapter

This chapter’s goalCluster a dataset and defend the number of clusters with more than an elbow plot, reduce dimensionality with PCA and state how much information the reduction discarded, explain what an embedding is as a geometric object, and build a working nearest-neighbour search over pretrained embeddings without a GPU.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:55Not available
Full audiobookNot availableNot available
Two measures of k on the same customer table00.501210kScore—— Adjusted Rand index across two 80% subsamples– – Mean silhouetteBoth agree on k = 4: the mean silhouette clears 0.5 there and only there, and clusterings of tworandom 80 per cent subsamples agree at an adjusted Rand index of 0.88. At k = 5 the agreementcollapses to 0.61, which says the fifth boundary is arbitrary whatever the silhouette says.
Both agree on k = 4: the mean silhouette clears 0.5 there and only there, and clusterings of two random 80 per cent subsamples agree at an adjusted Rand index of 0.88. At k = 5 the agreement collapses to 0.61, which says the fifth boundary is arbitrary whatever the silhouette says.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The elbow method, and its problem

Plot inertia against k. Inertia always falls as k rises (at k = n every point is its own cluster and inertia is zero) so you look for the “elbow” where the improvement slows.

On textbook data with well-separated blobs, the elbow is obvious. On real data it usually is not. The curve is a smooth decay with no clear corner, three people looking at the same plot pick three different values, and the method provides no way to adjudicate.

It is worth plotting, because it takes one line and occasionally the elbow is real. It is not worth treating as an answer.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Choosing k, and why the elbow rarely helps’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/how-many-clusters (Accessed: 29 November 2026).