The representative point of a cluster is called a centroid. This is the center of the samples that belong to the cluster and works as a prototype of the cluster. Therefore, finding the appropriate centroids that partition samples in a good manner is the goal of the K-means algorithm:
The centroid can be calculated as the mean of every point that belongs to the cluster. Assuming the sample points in the dataset are N vectors expressed as , the centroid of the cluster, , can be represented as follows:
This is just an equally weighted ...