Calculate the cophenetic distances between each observation in the hierarchical clustering defined by the linkage
qare original observations in disjoint clusters
t, respectively and
tare joined by a direct parent cluster
u. The cophenetic distance between observations
jis simply the distance between clusters
Z : ndarray
The hierarchical clustering encoded as an array (see
Y : ndarray (optional)
Calculates the cophenetic correlation coefficient
cof a hierarchical clustering defined by the linkage matrix Z of a set of \(n\) observations in \(m\) dimensions. Y is the condensed distance matrix from which Z was generated.
c : ndarray
The cophentic correlation distance (if
d : ndarray
The cophenetic distance matrix in condensed form. The \(ij\) th entry is the cophenetic distance between original observations \(i\) and \(j\).