This is documentation for an old release of SciPy (version 0.10.0). Read this page Search for this page in the documentation of the latest stable release (version 1.15.1).
scipy.cluster.hierarchy.ward
-
scipy.cluster.hierarchy.ward(y)
Performs Ward’s linkage on a condensed or redundant distance
matrix. See linkage for more information on the return structure
and algorithm.
The following are common calling conventions:
- Z = ward(y)
Performs Ward’s linkage on the condensed distance matrix Z. See
linkage for more information on the return structure and
algorithm.
- Z = ward(X)
Performs Ward’s linkage on the observation matrix X using
Euclidean distance as the distance metric. See linkage for more
information on the return structure and algorithm.
Parameters : | Q : ndarray
A condensed or redundant distance matrix. A condensed
distance matrix is a flat array containing the upper
triangular of the distance matrix. This is the form that
pdist returns. Alternatively, a collection of
m observation vectors in n dimensions may be passed as
a m by n array.
|
Returns : | Z : ndarray
The hierarchical clustering encoded as a linkage matrix.
|
See also
- linkage
- for advanced creation of hierarchical clusterings.