hdbscan

A high performance implementation of HDBSCAN clustering.

What is hdbscan?

A high performance implementation of HDBSCAN clustering.

Overview of hdbscan

What it is

HDBSCAN is a high performance implementation of Hierarchical Density-Based Spatial Clustering of Applications with Noise. It performs DBSCAN over varying epsilon values and integrates the result to find a clustering that gives the best stability over epsilon. This allows HDBSCAN to find clusters of varying densities and be more robust to parameter selection. The package inherits from sklearn classes and supports input in formats including arrays, pandas dataframes, and sparse matrices.

Key features

  • Returns a good clustering with little or no parameter tuning; the primary parameter, minimum cluster size, is intuitive and easy to select.
  • Orders of magnitude faster than the reference Java implementation and faster than highly optimized single linkage implementations in C and C++.
  • Provides visualization tools for the condensed cluster hierarchy, robust single linkage cluster hierarchy, and reachability distance minimal spanning tree.
  • Supports soft clustering via cluster membership strengths and persistence scores for each cluster.
  • Includes the GLOSH outlier detection algorithm, accessible via the outlier_scores_ attribute.
  • Offers robust single linkage clustering and a branch-detection post-processing step via the BranchDetector class.

Use cases

HDBSCAN is ideal for exploratory data analysis, where it can return meaningful clusters if they exist. It is suitable for clustering data with varying densities and for applications where parameter tuning should be minimized. The outlier detection and branch detection features extend its use to anomaly detection and analysis of branching structures in data.

Getting started

Install with conda (if you have Anaconda):conda install -c conda-forge hdbscanOr install with pip:pip install hdbscanExample usage:import hdbscanfrom sklearn.datasets import make_blobsdata, _ = make_blobs(1000)clusterer = hdbscan.HDBSCAN(min_cluster_size=10)cluster_labels = clusterer.fit_predict(data)

License and pricing

License: BSD-3-Clause. The package is open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/scikit-learn-contribhdbscan.svg)](https://yunodb.com/tools/scikit-learn-contribhdbscan?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/scikit-learn-contribhdbscan?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/scikit-learn-contribhdbscan.svg" alt="Featured on YunoDB" height="20"></a>