graphclust.cluster.JarvisPatrick#

class graphclust.cluster.JarvisPatrick(k=8, min_shared=4, *, include_self=True)[source]#

Bases: ClusterMixin, BaseEstimator

Jarvis–Patrick shared nearest neighbor clustering (1973).

Two samples are linked when each is among the other’s k nearest neighbors and they share at least min_shared neighbors; the clusters are the connected components of this graph. Singletons can be read as outliers. The result reacts strongly to both integer parameters, which motivated the fuzzy neighborhood similarity.