core Estimated learning time: 5 h

5.14 Clustering

You can segment data and defend the number of segments.

Before:03. Data Handling & AnalysisUnlocks:06. Deep Learning10. Production & MLOps13. Capstones, Portfolio & Interviews

Clustering finds structure without labels, and every algorithm imports assumptions: k-means wants round, similar-sized blobs, DBSCAN wants density, hierarchical hands you a dendrogram and a decision. Choosing k has tools — elbow, silhouette, stability — but no oracle. It opens the unsupervised run. The caution that keeps results honest: clustering always succeeds, even on uniform noise, so a clustering is a hypothesis to validate, never a fact to report.

Work through these

  • k-means, k-means++, and its assumptions

    The best-known clustering method, its improved initialisation, and the assumptions it quietly makes about cluster shape and size. Those assumptions are why it sometimes produces confidently wrong groups.

  • Hierarchical clustering and dendrograms

    Building a nested hierarchy of groups and reading it as a tree diagram, which lets you choose the number of clusters after seeing the structure. It is slower and more informative.

  • DBSCAN and density-based clusters

    A method that finds clusters of any shape by density and labels sparse points as noise, which the previous methods cannot do. It also does not require the number of clusters in advance.

  • Choosing k: elbow, silhouette, stability

    Three ways to choose how many clusters, none of them definitive, and the honest position that the number is a judgement supported by evidence. Defending the choice is the actual deliverable.

Sign in to keep your progress.

Free resources

Links last checked 29 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.