Clustering Clustering isĀ the act of organizing similar objects into groups within a machine learning algorithm . Assigning related objects into clusters is beneficial for AI models. Clustering has many uses in data science, like image processing, knowledge discovery in data, unsupervised learning, and various other applications.
To calculate new centroid take the mean values for each group. For group 1 there is only one element, so the new centroid for group 1 is A1. Group 2 contains A3, B1, B2, B3 and C2 datapoints, therefore we have to take average of the datapoints to find the new centroid. Centroid for x value = (8+5+7+6+4)/5=6 Centroid for y value = (4+8+5+4+9)/5=6 Group 3 contains A2 and C1 datapoints Centroid for x value=(2+1)/2=1.5 Centroid for y value=(5+2)/2=3.5