October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to compute the silhouette information:
> set.seed(22)
> km = kmeans(customer, 4)
> kms = silhouette(km$cluster,dist(customer))
> summary(kms)
Output
Silhouette of 60 units in 4 clusters from silhouette.default(x = km$cluster, dist = dist(customer)) :
Cluster sizes and average silhouette widths:
8 11 16 25
0.5464597 0.4080823 0.3794910 0.5164434
Individual silhouette widths:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1931 0.4030 0.4890 0.4641 0.5422 0.6333
> plot(kms)
Read now
Unlock full access