• Assignment step: For given set of K cluster centroids, K-means assigns each example to the cluster with closest centroid.
* fix centroids and optimize cluster assignments (optimizes the red highlighted part).(optimizes the red highlighted part)
• Refitting step: Re-evaluate and update the cluster centroids, i.e., for fixed cluster assignment, optimize the centroids