Interview: 'discuss the tradeoffs between k-means, DBSCAN, and HDBSCAN.'
mediumAnswer
- (1) k-means: fast, scales to millions (mini-batch), but assumes spherical + equal-size clusters + fixed k + non-robust to outliers.
- (2) DBSCAN: handles non-convex + detects noise, but needs eps tuning + fails with varying densities + O(n log n) with index.
- (3) HDBSCAN: no eps tuning + handles varying densities + hierarchy + stability, but slower + memory-heavy for big data + hyperparameter still matters.
- Rule: k-means → baseline / large-scale; DBSCAN → known density; HDBSCAN → real-world exploration.
Check yourself — multiple choice
- Same
- k-means (fast, big scale, spherical only) vs DBSCAN (non-convex + noise, but eps sensitive + fails varying density) vs HDBSCAN (no eps + varying density + hierarchy + stability, slower)
- Random
- Only one
k-means fast+spherical; DBSCAN non-convex+noise; HDBSCAN varying density+hierarchy.
#interview#clustering
Practise Unsupervised Learning
214 interview questions in this topic.
Related questions
- Interview: 'you're asked to segment 10M customers — how?'
- Interview: cluster 5M e-commerce customers for a marketing campaign.
- Interview: how would you group log messages from a large distributed system?
- Interview: business asks 'why is customer X in Cluster 3?' — how do you explain?
- Interview: 'you have to pick k for the executive team — walk me through it.'
- Interview: after segmentation, one segment has 60% women but each region shows 40%. Why?