EasyDeepLearn

How do you choose the number of clusters k?

easy

Answer

  • Use multiple signals, not one: the elbow method on inertia (look for the bend), the silhouette score (higher is better, up to 1), the gap statistic, and domain knowledge.
  • For density-based clustering (DBSCAN, HDBSCAN) you don't set k at all — you set density parameters instead.
Check yourself — multiple choice
  • The elbow method alone always gives the answer
  • Silhouette + elbow + domain knowledge combined
  • Always pick k = sqrt(n)
  • DBSCAN requires you to pick k

No single metric is perfect — combine elbow, silhouette, and business context.

#clustering#evaluation

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions