I am learning about the k-means clustering algorithm, and I have read that the algorithm is "Trying to minimise a loss function in which the goal of clustering is not met".
I understand the basic concept of the algorithm, which initialises arbitrary centroids/means in the first iteration and then assigns data points to these clusters. The centroids are then updated after the points are all assigned, and points are re-assigned again. The algorithm continues to iterate until the clusters do not change anymore. The algorithm tries to minimise the within-cluster sum of squares (WCSS) value which is a measure of the variance within the clusters.
However, I am having trouble understanding what is meant by a loss function in the context of this algorithm. Any insights are appreciated.