DBSCAN is a density-based clustering algorithm that needs no preset cluster count
K — only two parameters, ε and minPts. The ε-neighborhood is
Nε(p)={q∈D∣dist(p,q)≤ε}; a core point satisfies
∣Nε(p)∣≥minPts, a border point is non-core but inside some core point's ε-neighborhood, and noise points are neither.Density directly reachable:
p is a core point and
q∈Nε(p); density reachable: a chain of core points
p1,…,pm with consecutive direct reachability; density connected: some
o exists from which both
p and
q are density reachable. A cluster is a maximal set of density-connected points; noise is flagged explicitly. Complexity is
O(nlogn) with a KD-Tree or naive
O(n2).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).