Algorithm · Waymo · Hard
Given a data matrix $$X \in \mathbb{R}^{n \times d}$$ and a desired number of clusters $$k$$, solve the following tasks. Part A: K-means clustering Explain the K-means algorithm: state the objective it minimizes and describe the alternating optimization procedure used to optimize it. Implement Lloyd’s algorithm: begin with $$k$$ initial centroids; iterate until convergence or a maximum number of iterations: assign each point to the closest centroid; recompute every centroid…
Checking your access…