Write and suppose the cluster is nonempty. Expanding the Euclidean norm through its inner product givesSum over . The final term does not depend on , so its sum is , which proves the requested identity. This expansion is the starting point for the centroid sum-of-squares identity.
The centred observations sum to zero:By linearity of the inner product,This cancellation holds for every .
Combining the first two parts gives the centroid sum-of-squares identityThe added term is nonnegative and, since , vanishes exactly at . Thus the unique minimizing centroid in this step of K-means clustering isAn empty cluster needs a separate algorithmic convention because its sample mean is undefined and its objective is identically zero.
Expanding the squared Euclidean distances givesFor distinct centroids, chooseA point assigned to has the displayed distance difference at most zero and therefore ; assignment to gives the reverse inequality. The separating hyperplane is the perpendicular bisector of the line segment joining the two centroids. Points tied between them lie on that hyperplane. This is the nearest-centroid decision hyperplane.
The requested nonzero needs the additional assumption . It does not follow from the stated algorithm alone. In one dimension, take and , whose centroids are both zero. A tie rule that retains previous assignments can leave this configuration after an iteration. The inequalities at imply , while the inequality at zero implies , forcing . Thus the unconditional nonzero-separator claim has this degenerate exception.
Articles by others on the same topic
There are currently no matching articles.