From Nearest Centers to a Risk Decomposition
A squared-distance clustering rule assigns each observation to a closest center. The population risk of a fixed collection of centers is the expected squared distance from an observation to its closest center. To express this risk using regions of the feature space, we need to define those regions carefully: points can be equally close to more than one center, and the resulting assignment should be unambiguous.
Let \(X\) be a random vector taking values in \(\mathbb{R}^d\), with Borel probability distribution \(P\). Fix an ordered list of \(K\geq 1\) centers \(c_1,\ldots,c_K\in\mathbb{R}^d\). Write \(\|\cdot\|\) for the Euclidean norm. The squared-distance risk of this list is
This expectation is well-defined as a nonnegative extended real number. In particular, it is finite if \(E[\|X\|^2]<\infty\): for any fixed center \(c_1\), the minimum is at most \(\|X-c_1\|^2\), and \(\|X-c_1\|^2\leq 2\|X\|^2+2\|c_1\|^2\). No density is required; \(P\) may be discrete, continuous, or a mixture.
The order of the centers matters for this assignment rule when ties occur. The geometric comparisons are determined by the center locations, but the rule determines which cell receives a point on a tie. In particular, a tie-breaking rule is needed even if ties have probability zero: a partition of the whole space must assign every point.
Half-Space Comparisons and Cell Geometry
Comparing two squared distances gives a linear inequality in \(x\). For any indices \(i\) and \(j\),
The equivalence follows by expanding both squared norms and cancelling \(x\mathbin{\cdot}x\). Reversing the first comparison to a strict inequality reverses the resulting inequality to a strict one as well. The equality set, when the centers differ, is the perpendicular bisector of the segment joining them.
The coincident-center case follows directly: if \(c_i=c_j\), their distances are equal for every \(x\), so \(\|x-c_j\|^2\leq\|x-c_i\|^2\) always holds and the strict comparison never holds. This distinction matters when describing cells by intersections of comparisons; it cannot be inferred by treating the comparison as a nontrivial half-space.
For the smallest-index tie rule, a point belongs to \(V_j\) precisely when it is no farther from \(c_j\) than any center with a larger index, and strictly closer than every center with a smaller index. Thus
An intersection over no indices imposes no constraint. The strict comparisons exclude points tied with an earlier center, while the weak comparisons allow ties with later centers. The resulting cells need not all be closed: strict comparisons can make some parts of a cell open.
Worked Example: Two Centers on a Line
Take \(d=1\), \(c_1=0\), and \(c_2=4\), with ties assigned to the smaller index. The point \(x\) belongs to \(V_1\) when it is no farther from 0 than from 4:
Therefore \(V_1=(-\infty,2]\). The second cell must exclude the tie at \(x=2\), since that point is assigned to center 1. Its condition is \(|x-4|^2<|x|^2\), which gives \(x>2\), so \(V_2=(2,\infty)\). The two cells are disjoint and together cover the line.
Measurability, Partition, and Risk Identity
The cell definitions give both a partition and a convenient expression for risk. The partition claim is pointwise: for every \(x\), the finite collection of distances has at least one minimum, and the smallest index attaining it is unique. The measurability claim follows from the comparison sets, which are open or closed half-spaces when centers differ and are either the whole space or empty when centers coincide.
Proof. Each squared-distance function \(x\mapsto\|x-c_i\|^2\) is continuous. For each pair \(i,j\), the weak and strict comparison sets in the definition of \(V_j\) are Borel sets: by the distance expansion, they are half-spaces when \(c_i\ne c_j\); when \(c_i=c_j\), they are respectively \(\mathbb{R}^d\) and the empty set. Each \(V_j\) is a finite intersection of such sets, so it is Borel measurable.
For any fixed \(x\), let \(j(x)\) be the smallest index attaining the minimum of the \(K\) distances. By definition, \(x\in V_{j(x)}\). If \(x\) belonged to two distinct cells \(V_j\) and \(V_\ell\), both indices would be the smallest minimizer, which is impossible. Hence the cells cover \(\mathbb{R}^d\) and are pairwise disjoint.
At each \(x\), exactly one cell indicator is 1, and its center is a nearest center. Consequently,
Both sides are nonnegative measurable functions. Integrating this pointwise identity with respect to \(P\), and using additivity of the integral for a finite sum of nonnegative functions, gives the stated risk decomposition. The identity is valid even if the risk is infinite; if \(E[\|X\|^2]<\infty\), the bound given earlier makes it finite. \(\square\)
This theorem is a representation of the risk for a fixed list of centers and a fixed assignment rule. It does not assert that any such list minimizes risk, nor that a minimizing list exists.
Worked Example: Computing Risk from the Cells
Let \(X\) take values \(-1,1,3\) with probabilities \(0.2,0.3,0.5\), respectively, and use centers \(c_1=0\) and \(c_2=2\). The tie point is \(x=1\), assigned to the first center. Comparing squared distances gives \(V_1=(-\infty,1]\) and \(V_2=(1,\infty)\).
The observation \(X=-1\) is in \(V_1\) and has squared distance \((-1-0)^2=1\). The observation \(X=1\) is also in \(V_1\) and has squared distance \((1-0)^2=1\). The observation \(X=3\) is in \(V_2\) and has squared distance \((3-2)^2=1\). Therefore
The same calculation using the cell integrals is \(E[X^2\mathbf{1}\{X\in V_1\}]+E[(X-2)^2\mathbf{1}\{X\in V_2\}]=0.2+0.3+0.5=1\). This makes explicit that the decomposition uses the distance to the assigned nearest center, not the distance to a center chosen independently of the cell.
Higher-Dimensional Cells and Duplicate Centers
In dimensions greater than one, the pairwise comparisons have the same form. They describe which side of a perpendicular-bisector hyperplane is closer to a given center. A cell is an intersection of the relevant comparison regions. If all centers in a comparison are distinct, these regions are half-spaces. The intersection can be empty, for example if the constraints for one index are incompatible; the partition theorem still applies.
Worked Example: A Two-Dimensional Bisector
Take centers \(c_1=(0,0)\) and \(c_2=(2,0)\) in \(\mathbb{R}^2\), again assigning ties to index 1. Write \(x=(u,v)\). The first center is at least as close as the second exactly when
Thus \(V_1=\{(u,v):u\leq1\}\) and \(V_2=\{(u,v):u>1\}\). The tie set is the vertical line \(u=1\), and the rule assigns the entire line to \(V_1\). This is an example of a cell boundary being included in one cell; no assumption that the boundary has probability zero is needed for the partition or risk identity.
Worked Example: Coincident Centers and an Empty Cell
Consider the one-dimensional ordered centers \(c_1=0\), \(c_2=0\), and \(c_3=2\). Center 2 can never be selected under the smallest-index rule: its distance always ties with center 1, which has the smaller index. In the cell formula for \(V_2\), the comparison against \(c_1\) is strict, \(|x|^2<|x|^2\), which is impossible. Hence \(V_2=\varnothing\).
For center 1, the comparison with center 2 is weak and holds for every \(x\); the comparison with center 3 is weak and gives \(x\leq1\). Therefore \(V_1=(-\infty,1]\). For center 3, the comparisons against both earlier indices are strict. The comparison against center 2 gives \(|x-2|^2<|x|^2\), or \(x>1\), and the comparison against center 1 gives the same condition. Hence \(V_3=(1,\infty)\).
For a risk check, let \(X\) equal \(-1,1,2\) with probabilities \(0.2,0.3,0.5\). The squared nearest-center distances are \(1,1,0\), respectively: the tie at \(1\) is assigned to center 1, but either coincident center has the same distance. Thus
The cell sum gives the same answer: the first cell contributes \(0.2(1)+0.3(1)=0.5\), the empty second cell contributes zero, and the third cell contributes zero. The weak comparison for coincident centers gives all of the space; the strict comparison gives the empty set, exactly as the cell calculation requires.
Why the Partition Representation Matters
The nearest-center representation separates two ingredients of squared-distance clustering risk: the regions to which observations are assigned and the squared distance incurred within each region. It lets us integrate with respect to an arbitrary population distribution, including distributions with atoms on boundaries. It also makes clear that a tie rule is part of a pointwise assignment definition, not a claim about how often ties occur.
A common mistake is to describe a cell only by weak inequalities and then say that ties do not matter. Weak inequalities alone can put a tied point in several cells, so the claimed sets are not a partition of the space. The correction is to state an explicit rule and use strict comparisons against earlier centers and weak comparisons against later centers. Another related error is to treat every pairwise comparison as a nontrivial half-space: if the two centers coincide, the weak comparison is all of \(\mathbb{R}^d\) and the strict one is empty. These details ensure the cell sets are measurable and the risk decomposition is valid pointwise.
Check Your Understanding
Use the smallest-index tie rule unless a question specifies otherwise.
- For centers \(c_1=-2\) and \(c_2=2\) on the real line, find both cells and state which cell contains the tie point.
- Explain why the cells remain Borel measurable when two centers coincide.
- For a distribution assigning probabilities \(1/4\) and \(3/4\) to \(0\) and \(2\), respectively, and centers \(0\) and \(3\), calculate the nearest-center risk.
- Why are strict comparisons needed against centers with smaller indices in the definition of \(V_j\)?
- Does the risk decomposition require the distribution of \(X\) to have a density or to assign zero probability to cell boundaries? Explain.