A scree plot helps choose the number of clusters for K-means. It places candidate cluster counts on the x-axis and within-cluster sum of squares on the y-axis. section 11.5.2
Use the plot to identify the elbow:
- Increase K and recompute within-cluster variation. section 11.5.2
- Look for the bend where additional clusters produce diminishing reductions. section 11.5.2
- Treat the elbow as guidance rather than a definitive answer, then compare it with silhouette analysis. section 11.5.2
NBA team clustering
A scree plot can compare K values from 2 through 7 when clustering standardized team payrolls and regular-season wins. The chosen K=4 solution separates the teams into four clusters. section 11.5.2
options(scipen = 000) p3 <- fviz_nbclust(final_kmeans, kmeans, method = "wss") p4 <- fviz_nbclust(final_kmeans, kmeans, method = "silhouette")
Generate the within-sum-of-squares scree plot in R with fviz_nbclust(..., method = "wss"), alongside the silhouette diagnostic. section 11.5.2

