Density-based Spatial Clustering of Applications with Noise.
Density-based spatial clustering of applications with noise (DBSCAN)
is a clustering algorithm.
Key Concepts
Let's say X is the sef of all data points, dist(x,y)∈R is a function
to measure the distance between any two data points, ϵ∈R+ is the
distance limitation and minPts∈Z+ is the density limitation.
- Given ϵ∈R+ and p∈X, the ϵ neighbors of p is
Nϵ(x)={y∈X∣dist(x,y)≤ϵ}.
- Given x∈X, the density of x is ρ(x)=∣Nϵ(x)∣.
- Given x,y∈X, if y∈Nϵ(x) and ρ(x)≥minPts,
then we say y is directly density-reachable from x.
- Given x,y∈X, if there is a sequence p1,p2,⋯,pn, where x=p1,
y=pn, and every pi+1 is directly density-reachable from pi,
then we say y is density-reachable from x.
- Given x,y∈X, if there is a data point o∈X, where both x and y
are density-reachable from o, then we say x and y are density-connected.
The data points X will be divided by DBSCAN into several clusters (containing
core points and density-reachable points) based on density-connectivity
and outliers.
- Given ϵ∈R+, minPts∈Z+ and x∈X, if
ρ(x)≥minPts then we say x is a core point.
- Given x∈X, if x is not a core point but is density-reachable from
any core points, then we say x is a density-reachable point.
- Any other data points in X are outliers.
Pseudo Code
DBSCAN(X,minPts,ϵ):Clusters←∅for x∈X:if x∈∪c∈Clustersc∧Nϵ(x)≥minPts:Clusters←Clusters∪Expand(X,x,minPts,ϵ)Outliers←X−∪c∈Clusterscreturn Clusters,Outliers
Expand(X,x,minPts,ϵ):Cluster←{x}for y∈Nϵ(x):if ∣Nϵ(y)∣≥minPts:Cluster←Cluster∪Expand(X,y,minPts,ϵ)else:Cluster←Cluster∪{y}return Cluster
References