Skip to main content
  • Agentic AI
  • AI Governance
  • Airflow
  • Anaconda
  • Apache Spark
  • Artificial Intelligence
  • Clustering
  • Dask
  • Data Science
Home
Watch Demo
Watch Demo
  • Density-based clustering
  • dplyr
  • Factor analysis
  • Feature
  • Feature Engineering
  • Feature Extraction
  • Feature selection
  • Folium
  • GenomicRanges
  • ggmap
  • ggplot
  • GPU
  • Ground Truth
  • Hash table
  • Hyperparameter Tuning
  • Interpretability
  • Jupyter Notebook
  • Kubernetes
  • LLMOps
  • Machine Learning
  • Machine Learning Algorithms
  • MLOps
  • Model Drift
  • Model Evaluation
  • Model monitoring
  • Model Selection
  • Model Tuning
  • Overfitting
  • Plotly
  • PySpark
  • PyTorch
  • Responsible AI
  • Shiny (in R)
  • sklearn
  • Sovereign AI
  • spaCy
  • SR 26-2
  • Statistical Computing Environment (SCE)
  • TensorFlow
  • Underfitting
  • XGBoost
  • Density-based clustering

    What is density-based clustering?

    Density-based clustering is an unsupervised method that groups data points into clusters based on regions of high point density, separated by sparser regions treated as noise or outliers. Unlike centroid-based methods, it can find clusters of irregular shape.

    Why density-based clustering matters

    Because it doesn't assume clusters are round or evenly sized, density-based clustering finds groupings that centroid-based methods like k-means miss, and it naturally separates outliers instead of forcing every point into a cluster. Data scientists use it to flag malfunctioning servers, group genes with similar expression patterns, and surface anomalies in biomedical images, cases where the "shape" of a normal cluster isn't known in advance.

    How DBSCAN works

    DBSCAN works by picking a neighborhood radius (epsilon) and a minimum point count (MinPts). Points with at least MinPts neighbors within epsilon become core points; points near a core point but without enough neighbors of their own become border points; everything else is labeled noise. Clusters grow by expanding outward from core points until no more neighbors qualify. For example, in a scatter plot of customer purchase frequency, a dense cluster of frequent buyers would form its own group, while a handful of one-time purchasers scattered across the plot would be labeled noise rather than forced into that cluster or a cluster of their own.

    Types of density-based clustering

    DBSCAN (Density-Based Spatial Clustering of Applications with Noise) The most widely used density-based algorithm, first introduced by Ester et al. in 1996. It was recognized with the KDD conference's Test of Time Award in 2014 for its lasting influence on the field. See the comparison below for how it stacks up against its variants.

    OPTICS Builds on DBSCAN's core idea but handles clusters of varying density better, at the cost of additional computation.

    HDBSCAN A hierarchical variant of DBSCAN that removes the need to manually set a single density threshold, useful when cluster density varies across a dataset.

    Choosing between DBSCAN, OPTICS, and HDBSCAN

    Algorithm

    Best for

    Tradeoff

    DBSCAN

    Uniform-density clusters

    Struggles when density varies across the dataset

    OPTICS

    Clusters of varying density

    More computation than DBSCAN

    Industry use cases

    Financial services

    Fraud detection systems use density-based clustering to flag transactions that fall outside dense, "normal" spending regions, without needing to define fraud patterns in advance.

    Life sciences

    Researchers use density-based clustering to identify patient subgroups in clinical trial data whose outcomes cluster together in ways a predefined staging system wouldn't capture, useful when the number of natural subgroups isn't known ahead of time.

    Public sector

    Public sector agencies use density-based clustering to identify unusual clusters in benefits claims or utility usage data, surfacing patterns that don't fit predefined categories without requiring the number of anomaly types to be known in advance.

    FAQ

    What's the difference between density-based clustering and k-means?

    K-means assigns every point to the nearest of a fixed number of centroids, which works well for round, evenly sized clusters. Density-based clustering instead groups points by local density and can find irregularly shaped clusters, while explicitly labeling sparse points as noise instead of forcing them into a cluster.

    What is DBSCAN used for?

    Identifying clusters of arbitrary shape in data where the number of clusters isn't known in advance, and where outliers should be excluded rather than assigned. Libraries like scikit-learn implement DBSCAN directly, exposing epsilon and MinPts as tunable parameters.

    What are epsilon and MinPts?

    The two parameters DBSCAN needs: epsilon sets how close points must be to count as neighbors, and MinPts sets how many neighbors a point needs to become a core point.

    Does density-based clustering require you to specify the number of clusters in advance?

    No, that's one of its main advantages over k-means. The tradeoff is that DBSCAN and its variants require tuning a density threshold instead, which has its own learning curve.

    Summary

    • Why density-based clustering matters
    • How DBSCAN works
    • Types of density-based clustering
    • Choosing between DBSCAN, OPTICS, and HDBSCAN
    • Industry use cases
    • FAQ
    Domino's logo

    Who is Domino?

    Domino Data Lab empowers the largest AI-driven enterprises to build and operate AI at scale. Domino’s Enterprise AI Platform provides an integrated experience encompassing model development, MLOps, collaboration, and governance. With Domino, global enterprises can develop better medicines, grow more productive crops, develop more competitive products, and more. Founded in 2013, Domino is backed by Sequoia Capital, Coatue Management, NVIDIA, Snowflake, and other leading investors.

    Watch Demo
    • Platform

        • AI infrastructure
        • Data management
        • AI workbench
        • MLOps
        • AI governance
        • FinOps
        • Pricing
        • Security & compliance
        • What's new
    • Solutions

      • Industries

        • Life sciences
        • Finance
        • Public sector
        • Retail
        • Manufacturing
      • Use Cases

        • Generative AI
        • Cost-effective data science
        • Self-service data science
        • Model risk management
        • Cloud data science
    • Learn

        • Events
        • Blog
        • Podcast
        • Courses and certifications
        • Data Science Dictionary
        • Documentation
        • Support
        • Demo hub
    • Company

        • About
        • Why Domino
        • Careers
        • Sustainability
        • News and press
        • Partners
        • Customers
        • Contact us

    © 2026 Domino Data Lab, Inc. Made in San Francisco.

    • Do not sell my personal information
    • Privacy policy
    • Terms and conditions
    • Security
    • Legal

    HDBSCAN

    Varying density, no manual threshold

    Still sensitive to how MinPts is set