This is a question about k-means clustering algorithm. I have the following points and clustering of data S1. Can anyone tell me how to calculate the total error associated with this clustering? I know it’s not a strictly programming question, but I need it for my algorithm. I think the answer should be 4/3 but I have no idea how to calculate this. Can anyone help me?
x1= (2.0,1.0)
x2= (2.0,2.0)
x3= (1.0,2.0)
S1={ x1, x2, x3 }
There are many ways to calculate the error. Here’s one.
First calculate the centroid of the set, C1 = (x1+x2+x3)/3. Then calculate the error as the sum of the distances from the centroid: E1 = d(C1-x1) + d(C1-x2) + d(C1-x3).