scipy.cluster.hierarchy.median¶
- 
scipy.cluster.hierarchy.median(y)[source]¶
- Performs median/WPGMC linkage. - See - linkagefor more information on the return structure and algorithm.- The following are common calling conventions: - Z = median(y)- Performs median/WPGMC linkage on the condensed distance matrix - y. See- linkagefor more information on the return structure and algorithm.
- Z = median(X)- Performs median/WPGMC linkage on the observation matrix - Xusing Euclidean distance as the distance metric. See- linkagefor more information on the return structure and algorithm.
 - Parameters: - y : ndarray - A condensed distance matrix. A condensed distance matrix is a flat array containing the upper triangular of the distance matrix. This is the form that - pdistreturns. 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.
- scipy.spatial.distance.pdist
- pairwise distance metrics
 
