Yasheel Vyas
Yasheel Vyas

Reputation: 59

Can clusters overlap in hierarchical clustering?

Clustering resultCan clusters overlap in hierarchical agglomerative clustering. I implemented a distance matrix in R and plotted the clusters but the result show that the clusters overlap one over the other.

library(rioja)

View(dissimilarity)

dissimilarity=as.dist(dissimilarity)

#diss=dist(dissimilarity,method='canberra')
clust1=chclust(dissimilarity,method = "coniss")     #To plot the dendogram using coniss method
#clust=chclust(dissimilarity,method = "conslink")    #To plot the dendogram using conslink method
plot(clust1,hang=-1)

#creating the hclust object to implement hierarchial clustering

hc = hclust(dissimilarity, method = 'ward.D')
y_hc = cutree(hc,6)
dissimilarity=as.matrix(dissimilarity)    #To convert diss into a data matrix  
# Visualising the clusters
library(cluster)
clusplot(dissimilarity,
         y_hc,
         lines = 0,
         shade = FALSE,
         color = TRUE,
         labels= 1,
         plotchar = FALSE,
         span = TRUE,
         main = paste('Clusters'),
         )

Upvotes: 0

Views: 1631

Answers (1)

Bernhard
Bernhard

Reputation: 4417

The impression of overlapping clusters may be based upon a 2D-plot of possible multidimensional data or upon false use of the function syntax. The function clusplot in package cluster uses prcomp or cmdscale depending on the argument diss being false or true for dimensionality reduction.

According to help(clusplot), diss tells the function, whether a dissimilarity matrix or a matrix of observations is given to the function. I your case, a dissimilarity matrix is given to the function without setting diss = TRUE. This is probably a wrong use of the plotting function.

Upvotes: 2

Related Questions