Evaluation metrics for hierarchical cluster in R

I would like to know how to assess the quality of the cluster generated by the code below. It is a hierarchical cluster. I know that there are assessment measures for clusters, such as accuracy, recall, F1-measure, Rand Index, among others.

Could you help me find the values corresponding to at least two of these metrics?

Thank you so much!

library(ggplot2)
library(rdist)
library(geosphere)


df<-structure(list(Industries = c(1,2,3,4,5,6), 
                   Latitude = c(-23.8, -23.8, -23.9, -23.7, -23.7,-23.7), 
                   Longitude = c(-49.5, -49.6, -49.7, -49.8, -49.6,-49.9), 
                   Waste = c(526, 350, 526, 469, 534, 346)), class = "data.frame", row.names = c(NA, -6L))

#clusters
coordinates<-df[c("Latitude","Longitude")]
d<-as.dist(distm(coordinates[,2:1]))
fit.average<-hclust(d,method="average") 
clusters<-cutree(fit.average, k=3) 
df$cluster <- clusters 
plot(fit.average,hang=-1,cex=.8,main="Average Linkage Clustering")
rect.hclust(fit.average,k=3)

image

I believe that there must be packages for cluster validation,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.