bundles / scipy 1.17.1 / scipy / cluster / _hierarchy / nn_chain
cython_function_or_method
scipy.cluster._hierarchy:nn_chain
Signature
def nn_chain ( dists , n , method ) Summary
Perform hierarchy clustering using nearest-neighbor chain algorithm.
Parameters
dists: ndarrayA condensed matrix stores the pairwise distances of the observations.
n: intThe number of observations.
method: intThe 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.nn_chain