1
$\begingroup$

In hierarchical clustering procedure, a distance matrix is used to construct a dendrogram with an appropriate method of clustering. In the process of constructing a dendrogram, a cophenetic matrix is computed. I understand that such a cophenetic matrix is used to assess clustering consistency.

How can I use a cophenetic matrix as such to plot the dendrogram?

$\endgroup$
  • 1
    $\begingroup$ A cophenetic matrix would be a distance matrix wherein original pairwise distances between the objects are replaced by the computed distances between their clusters at the time of these clusters' merge. Now, most hierarchical clustering programs do not construct such a matrix (no need for) and they plot dendrogram out of another source (such as agglomeration history protocol). $\endgroup$ – ttnphns Jun 20 '14 at 6:22
  • 1
    $\begingroup$ P.S. You surely can use that matrix to build the dendrogram, but it is cumbersome to do because a step number is not written there! $\endgroup$ – ttnphns Jun 20 '14 at 6:27
  • $\begingroup$ @ttnphns what do you mean by step number? Is it height or the merge groups? $\endgroup$ – Crops Jun 20 '14 at 6:49
  • $\begingroup$ I have a cophenetic matrix derived from an iterative ordering method of clustering. I would like to use that for plotting a dendrogram. $\endgroup$ – Crops Jun 20 '14 at 6:51
  • 1
    $\begingroup$ Step number - step of agglomeration in hierarchical clustering. Ordinal number of bars (not branches) on dendrogram. $\endgroup$ – ttnphns Jun 20 '14 at 7:10
3
$\begingroup$

You can just recreate the plot using hclust on the cophenetic of the object, and it would get you what you want (the method used in hclust doesn't matter).

set.seed(2015-04-26)
dat <- (matrix(rnorm(100), 4, 24))
dat_dist <- dist(dat)
hc1 <- hclust(dat_dist)

dat_dist

hc2 <- hclust(cophenetic(hc1), method = "complete")
hc3 <- hclust(cophenetic(hc1), method = "single")
hc4 <- hclust(cophenetic(hc1), method = "ave")

par(mfrow = c(1,4))
plot(hc1)
plot(hc2)
plot(hc3)
plot(hc4)

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.