I am studying about the K-means algorithm. I have understand the logic behind this algorithm, it identify the similar category of data point in one cluster and create different clusters for different heterogeneous data points. Now to perform this, we first select centroids then find the distance of each data point from these centroids to identify the specific cluster and this process runs in loop till convergence. Here, I need your help to understand the convergence in detail. Can you please help me to understand the convergence with an example?

# How convergence is generated in K-means algorithm

**Steve**#2

Look at the below steps to know “how convergence is generated” and it forms most significant clusters.

- K-means picks k number centroids.
- Each data point forms a cluster with the closest centroids i.e. k clusters.
- Finds the centroid of each cluster based on existing cluster members (data points). Here we have new centroids (average of co-ordinates of existing members)
- As we have new centroids, repeat step 2 and 3. Find the closest distance for each data point from new centroids and get associated with new k-clusters. Repeat this process until convergence occurs i.e. centroids does not change.

Hope this helps!

Regards,

Steve