Skip to content

AI Glossary · Concepts

What is Linear Regression?

Linear Regression

Linear regression predicts a number by fitting a straight-line relationship between inputs and an outcome, such as estimating a home's price from its square footage. It is one of the oldest and most widely used models in statistics and machine learning.

· Chain of Thought

Model Training

  • 1 episode
  • 1 guest clip
  • 2 sources

Plot homes on a chart, square footage along the bottom and sale price up the side, and the dots drift upward. Linear regression draws the single straight line that best fits those dots, usually by minimizing the squared gaps between the line and the points (ordinary least squares). With more inputs (bedrooms, age, distance to downtown) the line becomes a flat plane in more dimensions, but the idea is the same: the prediction is a starting value plus each feature multiplied by its weight.

That simplicity is its strength. Each weight has a plain reading, “each extra 100 square feet adds about this much to price, holding the rest constant,” which makes it popular in economics, finance, forecasting and business analytics. It trains in seconds and is a standard baseline that fancier models must beat. It’s the most basic case of regression analysis, and adding a penalty on large weights gives the regularized forms ridge and lasso.

The catch is the straight-line assumption. Real relationships curve, interact and saturate, and a straight line will underfit them; outliers can drag the line, and correlated inputs make the weights hard to interpret. A weight also shows association, not cause. For predicting categories rather than numbers, the related tool is logistic regression. Neural networks are, loosely, many linear steps stacked with nonlinear functions in between. In episode 27 at 11:42, Cohesity’s Greg Statton describes checking whether new data falls far outside a linear regression line as a fast, inline way to spot unusual activity, a simple form of anomaly detection. The episode was sponsored by Galileo, where Conor worked at the time (31:17).

Hear it from the guest

“Does this data like dramatically fall outside of this, of this linear regression line?”

Quotes lightly edited to remove filler words.

Sources

From the conversation