The Observation Theory EncyclopediaFrom TSKAboutBy kindBy chapterBy Lean fileLedgerProvenance

sum of squared errors concept

DefinitionThe sum over rows of the squared distance to the row's cluster centre, the validity index k-means minimizes. Chapter 0 section 0.15.
ExamplePoints 1, 2, and 6 with centres 1.5 and 6 have sum of squared errors 0.25 + 0.25 + 0 = 0.5.
BookData Mining as Observation, draft 0.2, commit f3914f0; entry id sum-of-squared-errors, kind concept.
Statusno ledger row names this entry. Corrections: none recorded.
Defining equation

Book equation 9.1.

Assumptions and scope
  • The sum over rows of the squared distance to the row’s cluster centre, the validity index k-means minimizes. The error about any centre is the error about the mean plus the count times the squared distance between the two, so the mean minimizes it, and it is the identity reader’s distortion summed within clusters.
  • Two clusterings of the same rows with the same sum of squared errors can be read oppositely by a consumer that weighs directions unequally.
Prior artnone recorded
Evidencelean/DataMiningAsObservation/KMeans.lean, lean/DataMiningAsObservation/ReconstructionError.lean
Reviewednot yet reviewed; generated 2026-09-10 from records at the commits on the provenance page.
centrecentrecentrecentres at the means
The squared distance to the cluster centre, summed.

Equation

Book equation 9.1.

\[\mathrm{SSE}=\sum_{k=1}^{K}\sum_{i\in\mathcal C_k}\|x_i-c_k\|^{2},\qquad\text{the }P_C=I\text{ distortion summed within clusters}.\]

Book equation 0.30.

\[\mathrm{SSE}=\sum_{k}\sum_{i\in\mathcal C_k}\|x_i-c_k\|^{2},\qquad s_i=\frac{b_i-a_i}{\max(a_i,b_i)}.\]

Conditions

Conditions are curated in entries.toml rather than read from a record.

Ledger

none

First stated

Chapter 0 section 0.15 and chapter 9 section 9.1 of Data Mining as Observation.

Measurements

none

Failures and corrections

none

Invariance envelope

none declared

Machine checked

lean/DataMiningAsObservation/KMeans.lean, theorems sse_decomposition, mean_minimizes, assign_nearest, at observation-data-mining f3914f0; what the check covers is stated in the book’s appendix C.

lean/DataMiningAsObservation/ReconstructionError.lean, theorems recon_nonneg, recon_eq_zero_iff, recon_sum, recon_proj, at observation-data-mining f3914f0; what the check covers is stated in the book’s appendix C.

Used in

Data Mining as Observation chapters 0, 9.

Related

k-means; validity index; reconstruction error; identity reader; silhouette.

See also

Book equations stated beside the entry’s terms, not defining it: 4.2.

Ledger rows that cite the entry’s records without naming it: GO-3.

Sources-table rows that share a record with the entry without naming it: chapter 9 section 9.4, chapter 10 section 10.1.

Status

Generated 2026-09-10 by encyclopedia/generate.py; book at observation-data-mining f3914f0; the commit of every record is listed in the encyclopedia’s provenance.

← stratificationsupport →