Package: dbscan 1.2.8

dbscan: Density-Based Spatial Clustering of Applications with Noise (DBSCAN) and Related Algorithms

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>.

Authors:Michael Hahsler [aut, cre, cph], Matthew Piekenbrock [aut, cph], Sunil Arya [ctb, cph], David Mount [ctb, cph], Claudia Malzer [ctb]

dbscan_1.2.8.tar.gz
dbscan_1.2.8.zip(r-4.7-x86_64)dbscan_1.2.8.zip(r-4.7-arm64)dbscan_1.2.8.zip(r-4.6-x86_64)dbscan_1.2.8.zip(r-4.6-arm64)dbscan_1.2.8.zip(r-4.5-x86_64)
dbscan_1.2.8.tgz(r-4.6-x86_64)dbscan_1.2.8.tgz(r-4.6-arm64)dbscan_1.2.8.tgz(r-4.5-x86_64)dbscan_1.2.8.tgz(r-4.5-arm64)
dbscan_1.2.8.tar.gz(r-4.7-arm64)dbscan_1.2.8.tar.gz(r-4.7-x86_64)dbscan_1.2.8.tar.gz(r-4.6-arm64)dbscan_1.2.8.tar.gz(r-4.6-x86_64)
dbscan_1.2.8.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
dbscan/json (API)

# Install 'dbscan' in R:
install.packages('dbscan', repos = c('https://mhahsler.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mhahsler/dbscan/issues

Pkgdown/docs site:https://michael.hahsler.net

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

clusteringdbscandensity-based-clusteringhdbscanlofopticscpp

16.92 score 354 stars 127 packages 3.2k scripts 45k downloads 49 mentions 31 exports 2 dependencies

Last updated from:b4acdee7e2. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK172
linux-devel-x86_64OK227
source / vignettesOK547
linux-release-arm64OK168
linux-release-x86_64OK193
macos-release-arm64OK297
macos-release-x86_64OK574
macos-oldrel-arm64OK116
macos-oldrel-x86_64OK392
windows-devel-arm64OK312
windows-devel-x86_64OK249
windows-release-arm64OK327
windows-release-x86_64OK207
windows-oldrel-x86_64OK189
wasm-releaseOK134

Exports:adjacencylistas.dendrogramas.reachabilityaugmentclplotcompscoredistdbcvdbscanextractDBSCANextractFOSCextractXifrNNglancegloshhdbscanhullplotis.corepointjpclustkNNkNNdistkNNdistplotlofmrdistnclusternnoiseopticspointdensitysNNsNNclusttidy

Dependencies:genericsRcpp

Nearest-Neighbor Search and Graphs
Example data | k nearest neighbors | Reuse and reduce a search | Query new points | Fixed-radius nearest neighbors | Reduce a stored radius | Shared nearest neighbors | Neighbor-distance diagnostics | Connected components | Sorting results | Using non-Euclidean distances | Search strategies and performance | Important details | Reference

Last update: 2026-09-27
Started: 2026-09-27

Using Hierarchical DBSCAN (HDBSCAN)
Hierarchical DBSCAN | DBSCAN* vs cutting the HDBSCAN* tree | Simplified Tree | Cluster Stability Scores | Global-Local Outlier Score from Hierarchies | A Larger Clustering Example | Performance | References

Last update: 2026-09-27
Started: 2017-03-17

Outlier Detection with dbscan
Example data | Low point density | Local Outlier Factor (LOF) | GLOSH and HDBSCAN | Turning scores into candidates | DBSCAN noise is not an outlier score | Practical workflow | References

Last update: 2026-09-27
Started: 2026-09-27

Nearest-Neighbor Clustering with jpclust and sNNclust
Shared nearest neighbors | Example data | Jarvis--Patrick clustering | Shared nearest neighbor clustering | Reuse a nearest-neighbor search | Inspect the shared-neighbor graph | Use a precomputed distance matrix | Which method should you use? | References

Last update: 2026-09-27
Started: 2026-09-27

Ordering Points With OPTICS
Create an OPTICS ordering | Read the reachability plot | Choose minPts and eps | Extract a DBSCAN-like clustering | Extract clusters with the Xi method | Convert the ordering to a dendrogram | Predict labels for new observations | Use another distance measure | References

Last update: 2026-09-27
Started: 2026-09-27

Fast Density-based Clustering (DBSCAN and OPTICS)
Preamble | Introduction | Density-based clustering | The dbscan package | Performance Comparison | Concluding Remarks | Acknowledgments | Technical Note on OPTICS cluster extraction

Last update: 2026-09-27
Started: 2026-09-26

Getting started with dbscan
Installation | A first clustering | Prepare your own data | Choose minPts and eps | Assign new observations | When DBSCAN is not the best starting point | Next steps

Last update: 2026-09-26
Started: 2026-09-26

Using dbscan from Python

Last update: 2026-09-26
Started: 2026-09-26

Using dbscan with tidyverse

Last update: 2026-09-26
Started: 2026-09-26

Readme and manuals

Help Manual

Help pageTopics
Find Connected Components in a Nearest-neighbor Graphcomponents comps comps.dist comps.frNN comps.kNN comps.sNN
Density-Based Clustering Validation Index (DBCV)DBCV dbcv
DBCV Paper DatasetsDataset_1 Dataset_2 Dataset_3 Dataset_4 DBCV_datasets
Density-based Spatial Clustering of Applications with Noise (DBSCAN)DBSCAN dbscan is.corepoint predict.dbscan_fast print.dbscan_fast
Turn an dbscan clustering object into a tidy tibbleaugment augment.dbscan augment.general_clustering augment.hdbscan dbscan_tidiers glance glance.dbscan glance.general_clustering glance.hdbscan tidy tidy.dbscan tidy.general_clustering tidy.hdbscan
Coercions to Dendrogramas.dendrogram as.dendrogram.default as.dendrogram.hclust as.dendrogram.hdbscan as.dendrogram.reachability dendrogram
DS3: Spatial data with arbitrary shapesDS3
Framework for the Optimal Extraction of Clusters from HierarchiesextractFOSC
Find the Fixed Radius Nearest Neighborsadjacencylist.frNN frNN frnn print.frNN print.frnn sort.frNN
Global-Local Outlier Score from HierarchiesGLOSH glosh
Hierarchical DBSCAN (HDBSCAN)coredist HDBSCAN hdbscan mrdist plot.hdbscan predict.hdbscan print.hdbscan
Plot Clustersclplot hullplot
Jarvis-Patrick Clusteringjpclust print.general_clustering
Find the k Nearest Neighborsadjacencylist.kNN kNN knn print.kNN sort.kNN
Calculate and Plot k-Nearest Neighbor DistanceskNNdist kNNdistplot
Local Outlier Factor ScoreLOF lof
Moons Datamoons
Number of Clusters, Noise Points, and Observationsncluster nnoise nobs
NN - Nearest Neighbors Superclassadjacencylist adjacencylist.NN NN plot.NN sort.NN
Ordering Points to Identify the Clustering Structure (OPTICS)as.dendrogram.optics as.reachability.optics extractDBSCAN extractXi OPTICS optics plot.optics predict.optics print.optics
Calculate Local Density at Each Data Pointdensity pointdensity
Reachability Distancesas.reachability as.reachability.dendrogram plot.reachability print.reachability reachability reachability_plot
Find Shared Nearest Neighborsprint.sNN sNN snn sort.sNN
Shared Nearest Neighbor ClusteringsNNclust snnclust