liveBook · Manning

Linear regression

As explained in 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.

Linear regression models the relationship between one or more input variables and a real-valued output. For example, car characteristics such as build year, engine, and mileage can be used to estimate market price and judge whether a dealer’s asking price is fair. section 16.4.1

Begin by choosing a category of mathematical functions that can approximate the relationship in the dataset. A simple choice is a line, y = mx + b; the parameters m and b then determine the particular line learned from the data. section 16.4.1

The modeling progression is:

  • Choose a model family, such as a constant function, a line, or a more complicated curve. section 16.4.1
  • Fit the family’s parameters so that one specific function describes the observed data as well as possible. section 16.4.1
  • Balance model complexity against available data: simpler models generally require fewer data points to learn. section 16.4.1

Estimating a car’s market price

Train on cars whose characteristics and prices are known, then provide the characteristics of a car at a dealership. The model’s real-valued output gives an estimated price for comparison with the asking price. section 16.4.1

How Advanced Algorithms and Data Structures covers it

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 it assumes
Assumes labeled inputs and values, while introducing model families, parameters, and supervised regression framing.
What you can do after
Apply it to estimate a real-valued price from a new item’s measured characteristics.
How it connects
Connects supervised learning with independent variables, dependent variables, mathematical models, parameters, and cost functions.

Also explained in

Compare how 22 books explain linear regression →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.