I am using the PAM function in R, and I don't understand how to evaluate its output. Whereas in K-means the ratio between the between sum of squares to the total sum of squares already gives a very good insight into the outcome of the function, PAM has no such measure in its output. How can I assess if the model is good or bad?
You may look at the silhouette plot
library(cluster) ## generate 25 objects, divided into 2 clusters. x <- rbind(cbind(rnorm(10,0,0.5), rnorm(10,0,0.5)), cbind(rnorm(15,5,0.5), rnorm(15,5,0.5))) pamx <- pam(x, 2) spam <- silhouette(pamx) plot(spam)
You can get one value using:
Giving 0.880. (The value is between -1 to 1. While 1 means perfect clusters, and the lower it gets the less good the clusters are)