Back to Classic ML Mind Map
中文·English
📊 Classic MLID: dbscan-hierarchical

DBSCAN & Hierarchical Clustering

DBSCAN 与层次聚类
🎯Core Definition
DBSCAN is a density-based clustering algorithm that needs no preset cluster count KK — only two parameters, ε and minPts. The ε-neighborhood is Nε(p)={qDdist(p,q)ε}N_\varepsilon(p) = \{ q \in D \mid \text{dist}(p, q) \le \varepsilon \}; a core point satisfies Nε(p)minPts|N_\varepsilon(p)| \ge \text{minPts}, a border point is non-core but inside some core point's ε-neighborhood, and noise points are neither.Density directly reachable: pp is a core point and qNε(p)q \in N_\varepsilon(p); density reachable: a chain of core points p1,,pmp_1, \ldots, p_m with consecutive direct reachability; density connected: some oo exists from which both pp and qq are density reachable. A cluster is a maximal set of density-connected points; noise is flagged explicitly. Complexity is O(nlogn)O(n \log n) with a KD-Tree or naive O(n2)O(n^2).Hierarchical clustering (AGNES) merges the closest clusters bottom-up using linkages — single (nearest-point distance, prone to chaining), complete (farthest-point distance, noise-robust), Ward (minimum variance increase, most common); naive complexity O(n3)O(n^3).
💡Use Cases
geo-spatial clustering, image segmentation, anomaly detection (noise points are outliers), and arbitrarily shaped clusters; interviews compare it with K-Means and ask about ε/minPts tuning.
Key Problems Solved
K-Means needs K, assumes convex clusters, and forces noise into clusters; DBSCAN needs no K, finds arbitrary shapes, and separates noise automatically. The cost: ε is hard to set globally for uneven density (minPts ≈ 2×dimensions is a common heuristic) and neighborhood counting degrades in high dimensions (curse of dimensionality); hierarchical clustering keeps an O(n2)O(n^2) distance matrix, unfit for large data.
🎯5 High-Frequency Exam Points
1
Define core, border, and noise points in DBSCAN; how do larger/smaller ε and minPts change the clustering?
2
Distinguish density-reachable from density-connected; why is reachability asymmetric while connectedness is symmetric?
3
Core differences between DBSCAN and K-Means; which data shapes suit each; why does DBSCAN fail on uneven density?
4
Single, complete, and Ward linkage criteria in hierarchical clustering; what is the chaining effect?
5
Time complexity of DBSCAN and index acceleration; why is ε hard to choose in high dimensions?
📖 In-depth Guide:📄 clustering-and-knn
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "DBSCAN & Hierarchical Clustering"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardK-Means++ & K SelectionNext CardEM Algorithm

🔗 More Classic ML Knowledge Cards

AdaBoost DerivationBagging & Random ForestBaum-Welch (HMM EM)GBDT Negative Gradient