Skip to content
AI360XpertBeta
Core ML

Visual explainer

DBSCAN

How grouping by crowd density finds rings and chains, with core, border and noise calls shown.

Two nearest-center regions can split one ring.
Two nearest-center regions can split one ring.

DBSCAN groups points through crowded neighborhoods and can leave isolated samples unclustered. It does not ask for a cluster count, but it does require a distance metric, a radius eps, and a minimum neighborhood count minPts.

The opening comparison shows eight equally spaced samples on a radius-2 ring, rotated 22.5 degrees. Diamonds are two supplied centers at (−1,0) and (1,0); their nearest-center boundary is the vertical bisector. Open and solid samples show the two assignments. This is a possible two-center partition, not a claim that every ring must be split or that these centers are fitted means.

Count the Neighborhood

A radius of 1.1 around A includes A, B and C.
A radius of 1.1 around A includes A, B and C.

For a checkable one-dimensional example, use A=0, B=0.5, C=1, D=2, E=3, F=4 and G=7. Distance is absolute coordinate difference. The drawing zooms to 100 SVG units per coordinate unit and crops after D. The dashed circle is a distance ball intersecting the sample line; the upper bracket measures its horizontal radius, not another neighborhood.

With eps=1.1, A includes itself, B and C: distances 0, 0.5 and 1. D is 2 away and excluded. Under the self-inclusive convention in the official DBSCAN guide, a core point has at least minPts samples in its closed neighborhood. Here minPts=3, so A qualifies.

Three Point Types

Counts distinguish core, border and noise on the same data.
Counts distinguish core, border and noise on the same data.

The complete fixture now uses 60 SVG units per coordinate unit. The counts below A through G are 3, 3, 4, 3, 3, 2, 1. A through E are solid core points. F is an open border point: its count is too small, but it lies within the radius of core E. G is a cross for noise: it is neither core nor reachable directly from a core. Noise is an algorithmic label, not proof of a bad observation.

For example, C includes A, B, C and D; E includes D, E and F. F includes only E and F. Every neighborhood counts its center once.

Expand Through Cores

Core-to-core links carry the cluster out to border F.
Core-to-core links carry the cluster out to border F.

C, D and E are cores one unit apart. Expansion follows C→D→E and includes border F at the end. The shown links are a subset of qualifying neighbor relations; A and B join through C. E's radius is 1.1 units, or 66 SVG units, and the sample centers determine inclusion even where glyphs overlap its perimeter. G remains three units from F and four from E.

Mere overlap between two drawn radius circles is insufficient. Propagation needs an actual core point within the radius of another core. Border points can join but cannot extend the expansion.

Follow a Ring

Eight core points form a ring cluster while two strays stay noise.
Eight core points form a ring cluster while two strays stay noise.

Switch explicitly to a two-dimensional fixture: eight points at 45-degree intervals on a radius-2 ring, now aligned with the axes, plus the origin and (4.4,−1.8). Scale is 55 SVG units per coordinate unit. Use eps=1.6 and minPts=3.

Adjacent ring samples are 4sin⁡(π/8)≈1.53074\sin(\pi/8)\approx1.5307 apart; the next samples are 22≈2.82842\sqrt2\approx2.8284 apart. Every ring point therefore includes itself and its two immediate neighbors, so all eight are core and form one connected cluster. Chords show neighbor links, not a filled decision region. The origin is 2 from every ring sample; the external stray is more than 1.6 from all samples. Both stay noise.

Change the Radius

Increasing eps can connect previously isolated points.
Increasing eps can connect previously isolated points.

Return to A through G at 60 SVG units per unit, keeping minPts=3. At eps=0.75, only B is core: A and C are border, while D, E, F and G are noise. At eps=1.1, A through E become core and F becomes border. The two circles are centered on B and measure the two radii on the same scale. This is parameter sensitivity on this fixture, not a universal best radius.

Unequal Densities

A radius that recovers sparse points can merge dense groups.
A radius that recovers sparse points can merge dense groups.

A separate one-dimensional fixture contains intended groups 0.4, 1.8, and 9. Both rows share 55 SVG units per unit. Brackets identify these intended groups; close dots retain their true spacing rather than being spread for appearance.

With minPts=3 and eps=0.3, the middle of each dense triple is core and its ends are border; the three sparse samples are noise. At eps=2.1, the first six samples all become core and merge. The sparse middle sample becomes core and its two ends become border. In fact, recovering the sparse triple needs a radius of at least 2, which already spans the dense groups' gap of 1. Different density scales can therefore conflict.

Change the Minimum Count

Raising minPts can remove part of an existing cluster.
Raising minPts can remove part of an existing cluster.

Return to the original A–G fixture and eps=1.1. Changing minPts from 3 to 4 leaves only C core, since only C has four samples in its neighborhood. A, B and D are within 1.1 of C and become border. E, F and G are noise. Counts have not changed; the qualifying threshold has. Radius and minimum count jointly determine what the method can connect.

Border Is a Stop

A border point cannot extend the cluster to its neighbor.
A border point cannot extend the cluster to its neighbor.

For an explicit counterexample, use coordinates 2.6, eps=1.1, and minPts=4. The drawing deliberately zooms to 100 SVG units per unit. The first four samples have counts 4,4,4,5 and are core. The point at 1.6 has count 3: itself, 0.6 and 2.6. It is border because it touches core 0.6. The last point has count 2 and touches no core, so it is noise.

The dashed segment is an available distance relation that expansion cannot follow; the vertical stop marks this restriction. A plain connected-components algorithm on all neighbor edges would incorrectly absorb 2.6.

Where It Breaks

A chain of core points can merge two intended groups.
A chain of core points can merge two intended groups.

Take intended groups 2 and 6, with eps=1.1 and minPts=3. Add the amber point at 3. Every interior point from 1 through 5 now has three neighbors including itself, so the bridge is core, not removable noise. The two endpoints are border. DBSCAN returns one cluster even though the brackets mark two intended groups.

Density connectivity cannot establish semantic identity. A dense bridge and conflicting density scales are reasons to reconsider the representation, metric or clustering method. Border points shared by multiple core components can also have order-dependent assignments; this fixture avoids that ambiguity. Neighborhood search costs depend on data and implementation, so finding a nonconvex shape does not imply cheap computation.

The Quick Version

  • DBSCAN uses a radius and minimum neighborhood count.
  • Counts include the point itself.
  • Core points propagate clusters; border points stop expansion.
  • Noise need not be an erroneous observation.
  • Ring samples can connect without filling their center.
  • Radius changes can recover points or merge intended groups.
  • Increasing minPts can remove previously connected samples.
  • Mixed densities can conflict under one global radius.
  • Neighbor connectivity alone is insufficient when links pass through borders.
  • A dense bridge can merge semantically different groups.