Step 2: Put any initial partition that classifies the data into k clusters.Assign each of the remaining (N-k) training sample to the cluster with the nearest centroid.After each assignment, recompute the centroid of the gaining clusterYou may assign the training samples randomly, or systematically as the following: 1.Take the first k training sample as single- element clusters 2.