January 16, 2021
Following are the steps taken by K-Means algorithm in its learning process:
- User specifies the value of K using the elbow curve.
- For the first iteration, K number of points are arbitrarily chosen. Let’s call them centroids for the time being, in below steps you’ll get the reason for this nomenclature. In case of K-Means++, it is taken care that these points are farthest from each other. In further iterations the centroids calculated in step 4 are used.
- Distance of all the points from these K points is calculated and the point which is nearest to given centroid is assigned to that centroid. Thus first set of K clusters are formed.
- Centroid for each cluster is calculated. [That’s why we were calling the arbitrarily chosen points as centroids]
- Go back to step 2 and repeat the process till the time centroids don’t move at all or the maximum number of iterations is reached. Beyond a certain number of iteration the movement in centroid, hence decrease in WCSS, is negligible.
by : Monis Khan
Quick Summary:
Following are the steps taken by K-Means algorithm in its learning process: User specifies the value of K using the elbow curve. For the first iteration, K number of points are arbitrarily chosen. Let’s call them centroids for the time being, in below steps you’ll get the reason for this nomenclature. In case of K-Means++, […]