graphclust.cluster.SharedNearestNeighborClustering#
- class graphclust.cluster.SharedNearestNeighborClustering(k=20, *, eps=7, min_pts=10)[source]#
Bases:
ClusterMixin,BaseEstimatorShared 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 leasteps; samples with density at leastmin_ptsare core samples. Core samples linked by similarity \(\ge\)epsform the clusters, non-core samples join the most similar core sample if that similarity is at leasteps, and the rest is noise. Working on shared neighbors instead of distances makes the method robust to clusters of different density.