leaders
- scipy.cluster.hierarchy.leaders(Z, T)
Return the root nodes in a hierarchical clustering.
Returns the root nodes in a hierarchical clustering corresponding to a cut defined by a flat cluster assignment vector
T. See thefclusterfunction for more information on the format ofT.For each flat cluster of the flat clusters represented in the n-sized flat cluster assignment vector , this function finds the lowest cluster node in the linkage tree Z, such that: