Dear List i'm performing hierarchical clustering analysis with ward method.
My best clusters are choosen according to silhouette score...
Now I'd like to select the most representative term in each cluster.
Do you think that searching for medoids could be a good idea?
Here is the code that I use  applied to the Usaarrest dataset

mydist = dist(USArrests,method="euclidean")
clusters = cutree(hclust(mydist,method="ward"), k=5) # get 5 clusters
mydist = as.matrix(mydist) # get a full matrix

# function to find medoid in cluster i
clust.medoid = function(i, distmat, clusters) {
    ind = (clusters == i)

    names(which.min(rowSums( distmat[ind, ind] )))
    # c(min(rowMeans( distmat[ind, ind] )))
}
#
sapply(unique(clusters), clust.medoid, mydist, clusters)

Best
Guido

	[[alternative HTML version deleted]]

