{ } Raw JSON

bundles / scipy 1.17.1 / scipy / cluster / _hierarchy / linkage

cython_function_or_method

scipy.cluster._hierarchy:linkage

Signature

def   linkage ( dists n method )

Summary

Perform hierarchy clustering.

Parameters

dists : ndarray

A condensed matrix stores the pairwise distances of the observations.

n : int

The number of observations.

method : int

The linkage method. 0: single 1: complete 2: average 3: centroid 4: median 5: ward 6: weighted

Returns

Z : ndarray, shape (n - 1, 4)

Computed linkage matrix.

Aliases

  • scipy.cluster._hierarchy.linkage