Skip to content

Instantly share code, notes, and snippets.

View abakan-zz's full-sized avatar

Ahmet Bakan abakan-zz

  • San Francisco, CA
View GitHub Profile
import numpy as np
def single_linkage(dist, cutoff):
"""Return clusters determined by single-linkage agglomerative clustering.
For speedup, distance matrix may contain square-distances and
cutoff distance may be cutoff-square.
Parameters
----------