Tests understanding of iterative optimization and clustering – frequently asked for recommendation systems.
K-Means partitions data into k clusters by iteratively assigning points to the nearest centroid and updating centroids to be the mean of assigned points.
Your implementation should: