What is Within Cluster Sum of Squares (WCSS)?

The WCSS is a measure of the variability of observations within clusters that is calculated by taking the sum of the squared Euclidean distances between each observation and the centroid of its respective cluster. The cluster WCSS values are then averaged to get an overall WCSS for the clustering algorithm. Similar to error metrics in supervised learning, lower values of WCSS are preferable, indicating a more compact clustering.