Sum of Squared Errors (SSE) › Practical Applications

Michael BrenndoerferApril 22, 20254 min read
Machine Learning from ScratchAll chapters
Part 3 of 9Foundations
Chapter 23Sum of Squared Errors (SSE) › Practical Applications
Reading section 7 of 10 · Practical Applications · 4 minSection 7 of 10 · 4 min

Book contents

Section 7 of 10 · 4 min read

Sum of Squared Errors (SSE) › Practical ApplicationsOne section · Sections in this chapter7 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Model Comparison

SSE is fundamental for comparing different models on the same dataset:

Out[3]:
Visualization
Scatter plot with linear, quadratic, and cubic fitted curves and their SSE values in the legend.
Linear, quadratic, and cubic fits to the same data. The legend reports each model''s training SSE: 125.03 for degree 1, 75.78 for degree 2, and 75.59 for degree 3. The quadratic and cubic curves nearly overlap, showing that the extra cubic complexity provides little additional training fit.
Bar chart with labeled SSE values of 125.03, 75.78, and 75.59 for polynomial degrees one, two, and three.
Training SSE across polynomial degrees. SSE falls sharply from the linear to the quadratic model, then changes only slightly for the cubic model. Higher-order models can reduce training SSE while still overfitting and performing poorly on new data.

Outlier Impact

SSE is sensitive to outliers because squaring amplifies large errors:

Out[4]:
Visualization
Scatter plot of clean data and one high outlier with regression lines fitted with and without the outlier; legend reports SSE values of 10.92 and 136.32.
Impact of outliers on SSE. The plot demonstrates how a single outlier (red point) can dramatically increase SSE and pull the regression line away from the main data pattern. This visualization shows why SSE is sensitive to outliers and why robust regression methods or outlier detection are important in practice.