In this section, we will discuss the k-means clustering algorithm. We will get an understanding of the algorithm first. k-means clustering uses the iterative refinement technique.
Let's understand some of the basics about the k-means algorithm. k refers to how many clusters we want to generate. Now, you can choose a random point and put the centroid at this point. The number of centroids in k-means clustering is not more than the value of k, which means not more than the cluster value k.
This algorithm has the two following steps that we need to reiterate:
- The first step is to assign the centroid.
- The second step is to calculate the optimization step.
To understand the steps of the k-means, we will look at an example. ...