Alvaro dM
Alvaro dM

Reputation: 11

Is there any way of starting a clustering algorithm (hclust) on a database that already is clustered?

I have a database (df) that is already clustered (Class) but I want to further group together those clusters with a hierarchical algorithm. I tried using "member" in the function hclust() but it keeps rebuilding the tree entirely

dendo <- hclust(vegdist(df, method = "euclidean"), method = "ward.D2", members = Class)
plot(dendo, labels = Class)

This gives me this tree, but I was hoping each label already grouped together (eg: all the "17" labels in one single leave or starting in the same branch):

Dendogram

enter image description here

To be clear, I'm not looking to re-order the branches but restart the clustering from a pre-set of clusters.

Upvotes: 1

Views: 88

Answers (0)

Related Questions