liveBook · Manning

Linear regression

Linear regression is a statistical modeling method that estimates a continuous response as a linear combination of predictor variables and fitted coefficients.

How 22 Manning books explain it

Causal Inference for Data Science

Linear regression is a regression method that estimates a linear relationship between an outcome and one or more predictors.

How it is used
Estimates direct or total causal effects by selecting regression covariates from a causal graph.
How deep it goes
Works through covariate specifications, do-operator effects, and instrumental-variable coefficient ratios; flags RDD limitations without detailing them.
Examples
Uses treatment, recovery, side effects, synthetic confounding data, and R and Python regression or IV code.
What you can do after
Evaluate/understand which regression specification targets a direct or total effect and when a naive coefficient is biased.

Read how Causal Inference for Data Science explains linear regression →

Grokking Machine Learning

A regression technique that models a numerical target as a linear function of input features.

How it is used
Predicts numerical labels from house features within supervised learning, rather than assigning categories.
How deep it goes
Works from a plotted line through iterative parameter updates and Python implementation to real-data modeling, favoring geometry over formal derivation.
Examples
Uses room-count house prices, plotted fitting lines and a Hyderabad housing dataset with an RMSE report.
What you can do after
Build it from scratch with Python updates or apply it via Turi Create to predict housing prices and inspect RMSE.

Read how Grokking Machine Learning explains linear regression →

Effective Data Analysis

Linearity is the property that a modeled relationship can be represented by additive changes proportional to predictor changes.

How it is used
Estimates continuous outcomes from predictors for exploratory explanations and practical predictions.
How deep it goes
Develops simple and multiple equations, OLS fitting, coefficients, fit measures, and residual checks; does not derive the estimation algorithm.
Examples
Uses house-price estimation, weather and rat-sighting relationships, and production-cost and profit-margin modeling exercises.
What you can do after
Apply it via statsmodels OLS to estimate continuous outcomes, inspect diagnostics, and communicate limitations.

Read how Effective Data Analysis explains linear regression →

Statistics Every Programmer Needs

Linear regression is a statistical modeling technique that represents the relationship between a response variable and one or more predictors with a linear function.

How it is used
Models associations and predicts numeric outcomes from known predictors for forecasting and practical decisions.
How deep it goes
Works through equations, OLS fitting, output interpretation, and diagnostic tests without pursuing an abstract proof of coefficient estimation.
Examples
Fits Stage 2 ultramarathon split times from Stage 1 times and inspects a residuals plot.
What you can do after
Apply it via statsmodels OLS to fit a numeric-response model, interpret its output, and test its assumptions.

Read how Statistics Every Programmer Needs explains linear regression →

Math and Architectures of Deep Learning

A function that preserves addition and scalar multiplication between vector spaces, as in matrix multiplication.

How it is used
Models quantitative estimation tasks by mapping input features to a numeric prediction.
How deep it goes
Derives the weighted-sum-plus-bias model, squared-error objective, and gradient updates, while deferring nonlinear-model details.
Examples
Uses noisy y = 1.5x + 2.73 data and weekly mobile-phone demand from sales, discounts, and holiday timing.
What you can do after
Build it from scratch with PyTorch by computing predictions, mean squared error, gradients, and weight-and-bias updates.

Read how Math and Architectures of Deep Learning explains linear regression →

Experimentation for Engineers

A regression method that models a response as a linear function of explanatory variables.

How it is used
Fits surrogate business-metric models for response-surface optimization and per-action reward models for contextual decisions.
How deep it goes
Works through normal-equation and pseudoinverse implementations, quadratic feature construction, interpolation grids, and two-parameter cross terms.
Examples
Uses markout profit versus threshold and order size, plus viewing-time prediction from logged user contexts for posts.
What you can do after
Apply it via NumPy to fit quadratic surrogate functions, predict unmeasured outcomes, and search for estimated optimal settings.

Read how Experimentation for Engineers explains linear regression →

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

A statistical model that predicts a numeric response as a linear combination of input variables.

How it is used
Establishes an interpretable baseline for tabular numeric prediction before testing more complex models.
How deep it goes
Explains numeric encoding, coefficients, residual fitting, preprocessing checks, cross-validation, and diagnostics without lengthy mathematical derivations.
Examples
Uses Airbnb listing-price prediction, five-fold RMSE validation, transformed features, diagnostic plots, and a linear-regression-versus-XGBoost comparison.
What you can do after
Apply it via scikit-learn to build, validate, inspect, and compare a numeric tabular prediction baseline.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains linear regression →

Ensemble Methods for Machine Learning

Linear regression is a model that predicts a target as a linear combination of input variables.

How it is used
Predicts continuous labels from weighted input features.
How deep it goes
Defines the squared-loss objective and compares OLS, Ridge, LASSO, and Elastic Net regularization.
Examples
Uses noisy synthetic data, train-test splitting, fitted coefficients, and MSE or mean absolute error comparisons.
What you can do after
Apply linear regression through scikit-learn and evaluate predictions with MSE and mean absolute error.

Read how Ensemble Methods for Machine Learning explains linear regression →

Deep Learning with Python, Third Edition

A transformation that preserves linear structure and can be represented by matrix multiplication.

How it is used
Uses a weighted-input-plus-bias rule to introduce trainable linear predictions, while distinguishing continuous-value regression from classification.
How deep it goes
Works through TensorFlow training of a linear classifier and a neural network’s regression output, but not standalone linear regression on continuous targets.
Examples
Uses separable 2D point classes for the linear training loop and house prices for continuous-value prediction.
What you can do after
Build it from scratch as a TensorFlow linear classifier; apply an unactivated Keras Dense output to a house-price regression network.

Read how Deep Learning with Python, Third Edition explains linear regression →

Starting Data Analytics with Generative AI and Python

Linear regression is a statistical modeling technique that estimates a linear relationship between a dependent variable and one or more independent variables.

How it is used
Estimates how product weight and volume relate to shipping costs to inform a business question.
How deep it goes
Works through data preparation, OLS fitting, confidence-band plots, metrics, and interpretation without a mathematical derivation.
Examples
Compares weight-only, volume-only, and combined models of freight value using plots and reported error metrics.
What you can do after
Apply it via statsmodels to fit shipping-cost models and evaluate/understand their reported fit and errors.

Read how Starting Data Analytics with Generative AI and Python explains linear regression →

Deep Learning with R, Third Edition

A linear transform is a mapping that preserves vector addition and scalar multiplication and can be represented by matrix multiplication.

How it is used
Uses affine predictions as a simple model and an unconstrained final output for continuous-value regression.
How deep it goes
Works through weights, bias, squared-error training, and gradients for a classifier, but does not work through a standalone linear-regression fit.
Examples
Uses two clusters of synthetic points for a linear classifier and house prices for continuous-value regression.
What you can do after
Build it from scratch as an affine predictor trained with squared error, and distinguish a linear output from an entirely linear model.

Read how Deep Learning with R, Third Edition explains linear regression →

Statistics Slam Dunk

A multiple linear regression model represents a target variable as a function of two or more predictor variables, typically using a linear form.

How it is used
Models continuous outcomes from multiple predictors to identify and quantify hustle statistics associated with regular-season wins.
How deep it goes
Walks through preparation, splitting, fitting, diagnostics, multicollinearity, prediction, and competing-model comparison without formal derivations.
Examples
Uses NBA regular-season wins, screen-assist points, deflections, and loose balls in full and reduced R models.
What you can do after
Apply it via R to fit, diagnose, compare, and interpret multiple linear models for continuous targets.

Read how Statistics Slam Dunk explains linear regression →

Grokking Statistics

A regression method that models a dependent variable as a linear function of one or more predictors.

How it is used
Predicts numeric dependent variables from one or more independent variables through a fitted linear function.
How deep it goes
Explains simple and multiple fits, coefficients, residuals, least squares, R², RMSE, and cautions while deferring optimization algorithms to libraries.
Examples
Uses temperature and sports drink sales, house-size predictors, house-price prediction, and a fitted scatterplot.
What you can do after
Apply it via SciPy linregress to fit, interpret, plot, and evaluate predictions while checking model assumptions.

Read how Grokking Statistics explains linear regression →

Grokking AI Algorithms, Second Edition

Linear regression is a statistical modeling method that represents a continuous response as a linear function of one or more input variables.

How it is used
Uses linear regression to predict continuous values from known input–output examples.
How deep it goes
Works through plotting, fitting a line from means and differences, Python implementation, and testing predictions with R².
Examples
Uses carat–price pairs, scatter plots, a Python fitting function, and held-out diamond prices.
What you can do after
Build it from scratch in Python to fit a line, predict prices, and check predictions against unseen examples.

Read how Grokking AI Algorithms, Second Edition explains linear regression →

Machine Learning System Design

A linear model predicts an output as a linear combination of input features, optionally followed by a task-specific link or threshold function.

How it is used
Positions linear regression as a demand-forecasting baseline between simple rules and more specialized models.
How deep it goes
Works through feature choices, comparison criteria, and residual checks without deriving a fitting algorithm.
Examples
Uses grocery-sales forecasts built from lagged and rolling values, plus residual-versus-fitted and Q-Q diagnostic plots.
What you can do after
Diagnose/debug with it by checking residual plots and reconsidering features or model choice when assumptions fail.

Read how Machine Learning System Design explains linear regression →

Deep Learning with PyTorch, Second Edition

A mathematical mapping that combines inputs linearly, used here as a component of neural network layers before activation.

How it is used
Uses a one-input, one-output temperature fit to establish the learning process before introducing neural networks.
How deep it goes
Works through weight, bias, loss, and parameter updates, then contrasts a line with nonlinear networks rather than developing a general regression theory.
Examples
Uses paired thermometer and Celsius readings, then compares a neural network’s predictions with a line on noisy temperature data.
What you can do after
Build it from scratch by fitting a weight and bias to paired temperatures while minimizing prediction error in PyTorch.

Read how Deep Learning with PyTorch, Second Edition explains linear regression →

Causal AI

A linear model represents an outcome as a linear or affine function of predictor variables and model parameters, typically with an error term.

How it is used
Estimates identified causal effects with a fitted treatment coefficient and represents proportional mechanisms in structural causal models.
How deep it goes
Defines parameter fitting, works through backdoor regression and its coefficient interpretation, and flags the limits of linear causal assumptions.
Examples
Uses a femur-length-to-height equation and a game-engagement regression with three confounders, an effect estimate, and a confidence interval.
What you can do after
Apply it via DoWhy to estimate an identified backdoor effect and interpret the treatment coefficient under a linearity assumption.

Read how Causal AI explains linear regression →

Machine Learning Algorithms in Depth

Linear regression is a regression model that represents a response as a linear combination of input features.

How it is used
Predicts continuous responses from feature vectors within supervised learning.
How deep it goes
Derives fitting from Gaussian noise and a coefficient prior, then implements gradient descent; stops short of posterior inference.
Examples
Uses a ridge-regression implementation and a California housing fit plotted against average room count.
What you can do after
Build a regularized linear regressor from scratch using gradient descent and apply it to housing-price data.

Read how Machine Learning Algorithms in Depth explains linear regression →

Data Without Labels

A linear transformation is a mapping that preserves vector addition and scalar multiplication.

How it is used
Predicts continuous targets from labeled historical data within supervised learning.
How deep it goes
Defines simple and multiple linear equations and illustrates a fitted line, without developing a training procedure.
Examples
Uses height to predict weight and names revenue and rainfall as other continuous targets.
What you can do after
Evaluate/understand it by identifying a continuous prediction task and reading a linear fit as a relationship between inputs and target.

Read how Data Without Labels explains linear regression →

Bayesian Optimization in Action

Linear regression is a model that represents a response as a linear combination of input features and fitted coefficients.

How it is used
Encodes an expected objective trend inside Gaussian-process modeling and supports regression on continuous targets.
How deep it goes
Defines μ = wᵀx + b, explains coefficient roles and special cases, and demonstrates implementation without deriving coefficient fitting.
Examples
Uses housing prices, MNIST digit labels, advertising clicks, molecular energy, and drug effectiveness as regression targets.
What you can do after
Build it from scratch with GPyTorch by configuring LinearMean and pairing it with a covariance module.

Read how Bayesian Optimization in Action explains linear regression →

Advanced Algorithms and Data Structures

Linear regression is a supervised-learning technique that models the relationship between input variables and a real-valued dependent variable using a parameterized function.

How it is used
Uses labeled examples to estimate real-valued outputs such as goods’ prices.
How deep it goes
Explains model families, parameter fitting, complexity, and squared-error cost, but defers automated model selection.
Examples
Uses car characteristics and prices, plus constant, line, and quadratic models plotted against data.
What you can do after
Apply it to estimate a real-valued price from a new item’s measured characteristics.

Read how Advanced Algorithms and Data Structures explains linear regression →

Delivering Machine Learning Projects: From design to deployment

A linear model predicts an output as a linear combination of input variables and model parameters.

How it is used
Establishes baseline performance during early exploratory modelling and supports evaluation of later predictive models.
How deep it goes
Shows a quick implementation, correlated predictions, and explicit data assumptions, but stops short of solving the modelling problem.
Examples
Uses inventory demand, customer churn rates, limited datasets, and observed fluctuations as evaluation examples.
What you can do after
Evaluate model feasibility by producing baseline predictions and comparing them with observed fluctuations.

Read how Delivering Machine Learning Projects: From design to deployment explains linear regression →

Related concepts

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.