graphclust.cluster.SharedNearestNeighborClustering#

class graphclust.cluster.SharedNearestNeighborClustering(k=20, *, eps=7, min_pts=10)[source]#

Bases: ClusterMixin, BaseEstimator

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

The SNN similarity of two samples is the number of neighbors they share when each is in the other’s k-NN list (zero otherwise). The SNN density of a sample is the number of samples with similarity at least eps; samples with density at least min_pts are core samples. Core samples linked by similarity \(\ge\) eps form the clusters, non-core samples join the most similar core sample if that similarity is at least eps, and the rest is noise. Working on shared neighbors instead of distances makes the method robust to clusters of different density.