Skip to content

DBSCAN and Density-Based Clustering

Finding clusters of any shape and flagging noise points using density, with guidance on setting parameters.

Editorial team 1 min read

DBSCAN (Density-Based Spatial Clustering of Applications with Noise) groups points in dense regions and marks isolated points as noise.

How It Works

Two parameters:

  • eps: the neighbourhood radius.
  • min_samples: the number of points needed to form a dense region.

Points with enough neighbours are core points. Clusters grow from core points through their neighbours. Points that aren't reachable from any core point are noise.

Strengths

  • Finds clusters of arbitrary shape.
  • No need to specify the number of clusters.
  • Identifies outliers naturally.

Limitations

  • Struggles when clusters have very different densities.
  • Sensitive to eps; a k-distance plot helps choose it.
  • Less effective in high dimensions, where distances become less meaningful.

Variants

HDBSCAN extends the idea to varying densities and needs less tuning, making it a popular choice.

Uses

Geospatial clustering of locations, anomaly detection and grouping embeddings.

More in Machine learning

All Machine learning guides →
Machine learning Guide · 2 min

Linear Regression Explained

The simplest predictive model: how linear regression fits a line through data, how to read its coefficients, and when it breaks down.

Machine learning 2 min read 17 Sep 2026

Machine learning Guide · 2 min

Logistic Regression for Classification

Despite its name, logistic regression is a classification method. How it produces probabilities and why it remains a strong baseline.

Machine learning 2 min read 16 Sep 2026

Machine learning Guide · 2 min

Decision Trees

How decision trees split data with simple questions, why they are easy to explain, and why single trees overfit.

Machine learning 2 min read 15 Sep 2026

Machine learning Guide · 2 min

Random Forests

Why averaging many randomised decision trees produces a robust, accurate model with little tuning.

Machine learning 2 min read 14 Sep 2026