liveBook · Manning

Squared error

Also called residual sum of squares, sum of squared residuals

Squared error is a measure of discrepancy equal to the square of the difference between a predicted or fitted value and its corresponding observed or target value.

How 5 Manning books explain it

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Squared error is a loss measure computed as the squared difference between a predicted and observed numeric value.

How it is used
Guides regression fitting by defining the residual-sum-of-squares objective for linear models and a gradient signal for boosting.
How deep it goes
Connects the objective to linear-regression coefficients and boosting gradients, without deriving the squared-loss formula.
Examples
Uses a scikit-learn linear-regression pipeline with RMSE scoring and a from-scratch gradient-boosting regression loop.
What you can do after
Apply it via scikit-learn and XGBoost by selecting regression objectives and interpreting squared-error-based training workflows.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains squared error →

Statistics Every Programmer Needs

The sum of squared residuals is the sum of the squared differences between observed response values and their fitted values.

How it is used
Uses squared residuals to fit linear regression and evaluate how closely predictions match observed responses.
How deep it goes
Derives SSE through residuals and SST–SSR decomposition, but stops short of discussing optimization algorithms or loss-function variants.
Examples
Uses marathon stage1 and stage2 times, fitted values, a sum-of-squares table, and NumPy calculations.
What you can do after
Evaluate regression fit by calculating SSE directly from residuals and validating it against SST minus SSR.

Read how Statistics Every Programmer Needs explains squared error →

Grokking Machine Learning

A regression error metric equal to the sum of squared differences between observed and predicted target values.

How it is used
Measures how well a linear regression model’s line fits the observed data points.
How deep it goes
Defines the metric as a sum of squared vertical distances and compares good and poor fits visually.
Examples
Compares squared distances from data points to good- and poor-fitting regression lines.
What you can do after
Evaluate a linear regression fit by interpreting the sum of squared distances from points to its line.

Read how Grokking Machine Learning explains squared error →

Timeless Algorithms, The Foundational Ideas

Squared-error loss measures prediction error by squaring the difference between a predicted and observed value.

How it is used
Uses squared discrepancies to fit regression models and quantify prediction loss during neural-network training.
How deep it goes
Explains residual weighting and Gaussian-likelihood equivalence, then connects loss to neural-network training without detailing its derivatives.
Examples
Works through a study-hours and exam-score regression, including a predicted score and residual.
What you can do after
Understand how squared errors define regression fitting and provide a training signal for neural-network updates.

Read how Timeless Algorithms, The Foundational Ideas explains squared error →

Deep Learning with R, Third Edition

Squared error is a discrepancy measure equal to the square of the difference between a prediction and its target.

How it is used
Trains a linear classifier by providing a differentiable discrepancy between predictions and binary targets.
How deep it goes
Defines the formula and implements averaging, then applies gradient updates without deriving the gradients mathematically.
Examples
Uses two synthetic two-dimensional point classes, R/TensorFlow code, loss logs, and a plotted decision boundary.
What you can do after
Apply via TensorFlow and R by defining squared loss and minimizing it with gradient-based parameter updates.

Read how Deep Learning with R, Third Edition explains squared error →

Also covered in

What to know first

Related concepts

Questions about squared error

What is squared error?

Squared error is a measure of discrepancy equal to the square of the difference between a predicted or fitted value and its corresponding observed or target value.

Which Manning books explain squared error?

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI, Statistics Every Programmer Needs, Grokking Machine Learning, Timeless Algorithms, The Foundational Ideas and Deep Learning with R, Third Edition.

What should I know before learning squared error?

Manning books that teach squared error usually introduce linear regression, independent variable, neural network and gradient boosting first.

What is the difference between squared error and absolute error?

Squared error is a measure of discrepancy equal to the square of the difference between a predicted or fitted value and its corresponding observed or target value. Absolute error is an error measure based on the nonnegative absolute difference between an observed value and its prediction, optionally aggregated across observations.

What is squared error also called?

Squared error is also called residual sum of squares or sum of squared residuals.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.