Skip to content
StackDecode
AI & ML Atlas
Machine LearningalgorithmInteractive simulation

DBSCAN

Finds clusters as dense regions and labels isolated points as noise.

The idea

A point is a core point if at least minPts points lie within distance ε. Core points that are close to one another join the same cluster, and non-core points within ε of a core point become the cluster's edge. Everything else is noise. It finds clusters of any shape and does not need k.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

  • cluster 1
  • cluster 2
  • cluster 3
  • noise

Every point looks at neighbours within the radius. A point with 4 or more neighbours is a core point.

1/14

DBSCAN does not need k. The radius slider changes what counts as dense.

Step by step

  1. 1Pick ε and minPts.
  2. 2Find a point with at least minPts neighbours within ε: a core point.
  3. 3Grow a cluster by repeatedly adding the neighbours of core points.
  4. 4When no more can be added, start a new cluster from another unvisited core point.
  5. 5Label leftover points as noise.

Where it is used

Geographic data, anomaly detection, clusters of odd shapes.

Watch out for

One ε cannot fit clusters of very different densities.

Related