Machine Learning:Algorithms
KMeans Algorithm Starting from the basics of KMeans first, to understand KMEANS we need to understand first what is the meaning of KMeans. The word KMeans, we have two words K and Means which corresponds to number of clusters and their mean values respectively. Goal of the Algorithm: - To calculate the center of each of the given clusters by taking the mean of all of the points present in each of the cluster. Steps of this Algorithm: - 1) Start by having a random number of points according to the number of clusters as their centroids. 2) Now, we have to assign each point to its nearest cluster by calculating the distance of that point from all the points present in the various clusters. Like this all points will be assigned to a particular cluster. 3) Find the new center of the cluster by taking the mean of all the points in that respective cluster, and assign that mean to that random point. So, from now each ra...