Density-Based Spatial Clustering of Applications with Noise (DBSCAN) and Related Algorithms
Overview
A fast reimplementation of several density-based algorithms of the DBSCAN family. Includes the clustering algorithms DBSCAN (density-based spatial clustering of applications with noise) and HDBSCAN (hierarchical DBSCAN), the ordering algorithm OPTICS (ordering points to identify the clustering structure), shared nearest neighbor clustering, and the outlier detection algorithms LOF (local outlier factor) and GLOSH (global-local outlier score from hierarchies). The implementations use the kd-tree data structure (from library ANN) for faster k-nearest neighbor search. An R interface to fast kNN and fixed-radius NN search is also provided. Hahsler, Piekenbrock and Doran (2019) doi:10.18637/jss.v091.i01.
Changes
- Raised required R version to 4.3.0 to guarantee C++17 support.
- Parameter and return value validation is now consistent and strict.
Bugfixes
- clplot() now passes ... on to plot() (by m-muecke)
- hdbscan() and predict() for hdbscan objects now always return integer cluster assignments (by m-muecke)
- OPTICS: Fixed calculation for epsilon when set to infinity.
- predict() for dbscan, optics, and hdbscan objects now works with single-column data (by m-muecke)
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- WARNING12 OK, 1 WARNING2026-06-08
- OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 25 (1 internal)includes a package overview page
- Examples that run
- 100%23 run in a plain check (1 of them under a condition)
- Exported functions with examples
- 95%
- Documented parameters
- 95%
- Return-value docs
- 81%
- Help pages citing references
- 72%
- Getting started with dbscan
- Fast Density-based Clustering (DBSCAN and OPTICS) PDF
- Nearest-Neighbor Clustering with jpclust and sNNclust
- Nearest-Neighbor Search and Graphs
- Ordering Points With OPTICS
- Outlier Detection with dbscan
- Using dbscan from Python HTML
- Using dbscan with tidyverse HTML
- Using Hierarchical DBSCAN (HDBSCAN) HTML
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 18
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
6 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/mhahsler/dbscan on 2026-10-11.
GitHub Pages site last deployed 2026-10-09 · The repository has a site deploy workflow
pkgdown site last built 2026-10-09
Dependencies
Installing dbscan adds 2 packages (1 with compiled code, 1.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, generics 46 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 15 more dependents and 35 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.2.7Latest2026-10-05 · current release · diff ↗ ·
29 hours in CRAN's queue
Listed in CRAN's incoming queue from 2026-10-03 21:57 to 2026-10-05 03:17 UTC, in 8 readings. - 1.2.62026-08-25 · diff ↗
- 1.2.52026-06-09 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.2.42025-12-19 · diff ↗
- 1.2.32025-08-20 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.2.22025-01-26 · diff ↗
- 1.2.1
- 1.2-0
- RR 4.4.0 released · 2024-04-24
- 1.1-122023-11-28 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.1-11
- RR 4.2.0 released · 2022-04-22
- 1.1-10
Show 27 earlier eventsHide 27 earlier events
- 1.1-92022-01-11 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.1-82021-04-27 · diff ↗
- 1.1-72021-04-22 · diff ↗
- 1.1-62021-02-26 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.1-52019-10-23 · diff ↗
- 1.1-42019-08-05 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.1-32018-11-13 · diff ↗
- 1.1-22018-05-19 · diff ↗
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- 1.1-12017-03-20 · diff ↗
- 1.1-02017-03-19 · diff ↗ ·
added 7 exports
adjacencylist, sNN, hdbscan, extractFOSC, sNNclust, glosh, pointdensity - 1.0-02017-02-03 · diff ↗ ·
removed 2 exports
optics_cut, opticsXiadded 4 exports
extractDBSCAN, extractXi, jpclust, as.reachability - 0.9-8
- RR 3.3.0 released · 2016-05-03
- 0.9-7
- 0.9-62015-12-15 · diff ↗
- 0.9-5
- 0.9-42015-09-17 · diff ↗
- 0.9-32015-09-03 · diff ↗
- 0.9-2
- 0.9-1
- 0.9-02015-07-16
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2015-07-16
- Total releases
- 31 / 11 yrs
- License
- GPL (>= 3) OSI
- Copyright
- ANN library is copyright by University of Maryland, Sunil Arya and David Mount. All other code is copyright by Michael Hahsler and Matthew Piekenbrock.
- Minimum R
- ≥ 4.3.0
- Bundled data
- 107 KB / 6 files
- Download size
- 3.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("dbscan")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.