Reputation: 3
I have a data set which is two dimensional data with column names as attributes and rows as items. A sample is given below:
A1 A2 A3 A4 ....
Item1 0 1 0 0
Item2 0 0 0 1
Item3 1 1 0 0
....
I have used hclust (ward.D2 method) to create a cluster dendrogram in R. I can get the labels of all items in a cluster. How do i find out the list of attributes (A1 A2 etc) of the cluster so I can infer how those items came together?
The code which i have tried is :
d <- vegdist(data,method="jaccard")
fit <- hclust(d,method="ward.D2")
plot(fit)
hcd <- as.dendrogram(fit)
plot(cut(hcd,h=3)$upper)
labels(cut(hcd, h=3)$lower[[1]])
Upvotes: 0
Views: 875
Reputation: 77485
Hierarchical clustering does not handle columns.
It operates on the distance matrix - there are no column labels anymore.
You may be looking for biclustering instead.
Upvotes: 2