I implemented the K-Means Clustering Model to Analyse the Data in Python and R
- Choose the number K of the clusters
- Select at random K points , the centroids ( not necessarily from your dataset )
- Assign each data point to the closest centroid - That forms K cluster [ We basically take Eucleidan distance ]
- Compute and place the new centroid of each Cluster
- Reassign each data point to the new closest centroid -If any reassignment takes place go , to 4th step else END