The best solution is usually one that has a better (lower) value of J(x,c) , where:
J(x,c) = 1/|x| * Sum(distance(x(i),c(centroid(i)))) for each i in [1,|x|]
Wherre:
x is a list of samples|x| - size x (number of elements)[1,|x|] all numbers from 1 to |x| (inclusive)c is the list of centroids (or means) of the clusters (ie, for k clusters | c | = k)distance(a,b) (sometimes denoted as || ab || - distance between the "point" a to the "point" b (in Euclidean 2D space it is sqrt((ax-bx)^2 + (ay-by)^2) ))- centroid (i) - the centroid / average that is closest to
x(i)
Please note that this approach does not require switching to a controlled technique and can be fully automated!
source share