Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Machine learning›Linear Regression (ML)
Machine learningMachine learning

Linear Regression (ML)

Linear Regression as a Machine Learning Model · Also known as: ordinary least squares regression, OLS, least squares regression, multiple linear regression

Linear regression fits a straight-line relationship between one or more input features and a continuous numeric outcome by minimising the sum of squared prediction errors. As a machine-learning model it is trained on labeled examples and evaluated on held-out data, making it the simplest supervised learning baseline for any regression task.

ScholarGate
  1. Machine learning
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Linear Regression (ML)
Decision TreeGradient BoostingLogistic regression (ML)Random ForestRegularized linear regre…Ensemble Linear Regressi…Online Linear RegressionRobust Linear RegressionSemi-supervised Linear R…

When to use it

Use linear regression when the outcome is continuous, the expected relationship between predictors and outcome is approximately linear, and interpretable coefficients are needed. It is the right starting baseline before trying more complex models, and a good final model when its assumptions hold. Do not use it for binary or categorical outcomes (use logistic regression instead), when strong nonlinear patterns or interactions dominate, or when the number of predictors exceeds the sample size without regularisation.

Strengths & limitations

Strengths
  • Coefficients are directly interpretable: each value is a marginal effect in the outcome's units.
  • Computationally trivial — fits almost instantly even on large datasets.
  • Provides standard errors and p-values, supporting formal hypothesis testing.
  • Serves as the indispensable baseline against which more complex models should be compared.
  • Works well and is fully justified when the linearity assumption holds.
  • Highly compatible with regularisation extensions (Ridge, Lasso, Elastic Net) when predictors are many.
Limitations
  • Assumes a linear relationship; misses curves, thresholds, and interactions unless they are manually encoded.
  • Sensitive to outliers because squaring errors amplifies the influence of extreme points.
  • Multicollinearity among predictors inflates standard errors and destabilises coefficient estimates.
  • Requires that residuals be approximately normally distributed and homoscedastic for valid inference.

Frequently asked

How is linear regression different from logistic regression?

Linear regression predicts a continuous outcome directly. Logistic regression models the log-odds of a binary outcome and outputs probabilities bounded between 0 and 1. Using linear regression for a binary outcome can produce predictions outside [0, 1] and violates the constant-variance assumption.

Do I need to standardise my features?

Standardisation is not required for predictions, but it makes coefficients directly comparable when features have very different scales. It is especially recommended when using regularised variants such as Ridge or Lasso.

How do I handle many predictors relative to sample size?

Switch to regularised linear regression (Ridge for shrinkage, Lasso for sparsity, Elastic Net for both). OLS becomes unreliable or undefined when the number of predictors approaches or exceeds the number of observations.

What residual plots should I inspect?

At minimum: (1) residuals vs. fitted values to check for patterns suggesting nonlinearity or heteroscedasticity, and (2) a Q-Q plot of residuals to assess normality. A scale-location plot and leverage/influence statistics (Cook's distance) are also informative.

Is a high R-squared enough to declare a good model?

No. R-squared measures in-sample fit and can be inflated by irrelevant predictors. Always report cross-validated or test-set RMSE alongside R-squared, and inspect residual diagnostics to confirm the model's assumptions are satisfied.

Sources

  1. Hastie, T., Tibshirani, R. & Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd ed., Ch. 3). Springer. ISBN: 978-0-387-84858-7
  2. James, G., Witten, D., Hastie, T. & Tibshirani, R. (2013). An Introduction to Statistical Learning (Ch. 3). Springer. ISBN: 978-1-4614-7138-7

How to cite this page

ScholarGate. (2026, June 3). Linear Regression as a Machine Learning Model. ScholarGate. https://scholargate.app/en/machine-learning/linear-regression-ml

Related methods

Decision TreeGradient BoostingLogistic regression (ML)Random ForestRegularized linear regression

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Decision TreeMachine learning↔ compare
  • Gradient BoostingMachine learning↔ compare
  • Logistic regression (ML)Machine learning↔ compare
  • Random ForestMachine learning↔ compare
  • Regularized linear regressionMachine learning↔ compare
Compare side by side →

Referenced by

Ensemble Linear RegressionLogistic regression (ML)Online Linear RegressionRegularized linear regressionRobust Linear RegressionSemi-supervised Linear Regression

Similar methods

Multiple Linear RegressionSimple Linear RegressionOLS RegressionRegularized linear regressionOrdinary Least SquaresLogistic regression (ML)Multiple Regression AnalysisOnline Linear Regression

Related reference concepts

Regression and Function ApproximationMultiple Linear RegressionSimple Linear RegressionRegression and CorrelationLogistic RegressionSupervised Learning

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Linear Regression (ML) (Linear Regression as a Machine Learning Model). Retrieved 2026-07-21 from https://scholargate.app/en/machine-learning/linear-regression-ml · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Legendre, A.-M. & Gauss, C.F.
Year
1805–1809
Type
Supervised regression
DataType
Continuous numeric features and a continuous numeric target
Subfamily
Machine learning
Related methods
Decision TreeGradient BoostingLogistic regression (ML)Random ForestRegularized linear regression
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account