graphclust.cluster#

Graph-based clustering.

Tree-based methods

MSTClustering (Zahn’s inconsistent edges), HybridMSTGG (Vathy-Fogarassy, Feil and Abonyi: hypervolume splitting plus Gath–Geva) and HDBSCANStar (Campello, Moulavi and Sander: hierarchy of the mutual reachability MST with cluster stability).

Neighborhood-based methods

JarvisPatrick, fuzzy_neighborhood_similarity() and FuzzyNeighborhoodClustering (Vathy-Fogarassy, Kiss and Abonyi), SharedNearestNeighborClustering (Ertöz, Steinbach and Kumar) and DensityPeaks (Rodriguez and Laio).

Global graph methods

SpectralGraphClustering (normalized cuts with self-tuning affinities) and GraphCommunityClustering (modularity communities of a neighborhood graph: Louvain, Leiden, label propagation).

Every estimator follows scikit-learn: fit(X) sets labels_ (-1 marks noise where the method has such a notion) and fit_predict is available.

MST, hybrid MST-Gath-Geva, HDBSCAN*, Jarvis-Patrick, fuzzy neighborhood similarity, SNN, density peaks, spectral and community clustering.

Classes#

DensityPeaks([n_clusters, density, percent, k])

Clustering by fast search and find of density peaks (Rodriguez and Laio 2014).

FuzzyNeighborhoodClustering([n_clusters, k, ...])

Hierarchical clustering on the fuzzy neighborhood distance \(d_{ij}=1-s_{ij}\).

GraphCommunityClustering([k, graph, method, ...])

Community detection on a neighborhood graph (PhenoGraph-style pipeline).

HDBSCANStar([min_cluster_size, min_samples, ...])

HDBSCAN* (Campello, Moulavi and Sander 2013; 2015): density clustering from a spanning tree.

HybridMSTGG([max_clusters, lambda_, depth, ...])

Hybrid minimal spanning tree -- Gath--Geva clustering (Vathy-Fogarassy, Feil and Abonyi 2005).

JarvisPatrick([k, min_shared, include_self])

Jarvis--Patrick shared nearest neighbor clustering (1973).

MSTClustering([n_clusters, lambda_, ...])

Minimal spanning tree clustering with Zahn's inconsistent-edge criteria.

SharedNearestNeighborClustering([k, eps, ...])

Shared nearest neighbor density clustering (SNN; Ertöz, Steinbach and Kumar 2003).

SpectralGraphClustering([n_clusters, ...])

Normalized spectral clustering (Ng, Jordan and Weiss 2002) on a neighborhood graph.

Functions#

fuzzy_neighborhood_similarity(X[, k, r_max, ...])

Transitive fuzzy neighborhood similarity (Vathy-Fogarassy, Kiss and Abonyi 2007).

jaccard_knn_graph(X[, k])

kNN graph re-weighted by the Jaccard index of the neighbor sets (PhenoGraph-style, Levine et al. 2015).