This is documentation for an old release of SciPy (version 0.16.0). Read this page in the documentation of the latest stable release (version 1.15.1).
scipy.cluster.hierarchy.is_monotonic¶
- scipy.cluster.hierarchy.is_monotonic(Z)[source]¶
Returns True if the linkage passed is monotonic.
The linkage is monotonic if for every cluster \(s\) and \(t\) joined, the distance between them is no less than the distance between any previously joined clusters.
Parameters: Z : ndarray
The linkage matrix to check for monotonicity.
Returns: b : bool
A boolean indicating whether the linkage is monotonic.