Skip to contents

Clustering Algorithms

Cluster data with DBSCAN, OPTICS, HDBSCAN, shared nearest neighbor, and Jarvis-Patrick algorithms.

DBSCAN

Density-based spatial clustering of applications with noise.

dbscan() is.corepoint() predict(<dbscan_fast>)
Density-based Spatial Clustering of Applications with Noise (DBSCAN)

OPTICS

Ordering points to identify the clustering structure.

HDBSCAN

Hierarchical DBSCAN, its minimum spanning tree hierarchy, and the extraction of clusters from hierarchies.

hdbscan() print(<hdbscan>) plot(<hdbscan>) coredist() mrdist() predict(<hdbscan>)
Hierarchical DBSCAN (HDBSCAN)
extractFOSC()
Framework for the Optimal Extraction of Clusters from Hierarchies
mst_dist() mst_mrdist()
Minimum Spanning Tree Hierarchies

Shared Nearest Neighbor Clustering

Clustering based on shared nearest neighbor graphs.

sNNclust()
Shared Nearest Neighbor Clustering
jpclust()
Jarvis-Patrick Clustering

Find k-nearest, fixed-radius, and shared nearest neighbors and work with nearest-neighbor graphs.

kNN() sort(<kNN>) adjacencylist(<kNN>) print(<kNN>)
Find the k Nearest Neighbors
frNN() sort(<frNN>) adjacencylist(<frNN>) print(<frNN>)
Find the Fixed Radius Nearest Neighbors
sNN() sort(<sNN>) print(<sNN>)
Find Shared Nearest Neighbors
kNNdist() kNNdistplot()
Calculate and Plot k-Nearest Neighbor Distances
adjacencylist() sort(<NN>) plot(<NN>)
NN — Nearest Neighbors Superclass
comps()
Find Connected Components in a Nearest-neighbor Graph

Outlier Detection

Calculate local and hierarchical outlier scores and estimate local point density.

lof()
Local Outlier Factor Score
glosh()
Global-Local Outlier Score from Hierarchies
pointdensity()
Calculate Local Density at Each Data Point
kNNdist() kNNdistplot()
Calculate and Plot k-Nearest Neighbor Distances

Cluster Validation

Summarize, evaluate, and visualize clusterings, including reachability plots and cluster hierarchies.

ncluster() nnoise()
Number of Clusters, Noise Points, and Observations
dbcv()
Density-Based Clustering Validation Index (DBCV)
hullplot() clplot()
Plot Clusters
as.dendrogram()
Coercions to Dendrogram

Tidyverse Tidiers

Turn clustering objects into tidy tibbles and augment the original data.

tidy() augment() glance()
Turn a dbscan clustering object into a tidy tibble

Data Sets

Example and benchmark data sets for density-based clustering.

moons
Moons Data
DS3
DS3: Spatial data with arbitrary shapes
DBCV_datasets Dataset_1 Dataset_2 Dataset_3 Dataset_4
DBCV Paper Datasets