← Back to list

Life Beyond Ordinary Least Squares (OLS): When to use Ridge and LASSO Regression

A beginner’s guide to understanding Ridge, LASSO, and why OLS is not always enough, without the mathematical intimidation

Moumita Ghorai in Data Science in a World of Chaos · 2026-05-16 15:23 · 51 claps · 1.9 min read paywalled
#statistics #ridge-regression #lasso-regression #regression #machine-learning
Open on Medium ↗
Wiki topics: ML · Machine Learning EDU · Education & Learning 📐 · Mathematics

Life Beyond Ordinary Least Squares (OLS): When to use Ridge and LASSO Regression

A beginner’s guide to understanding Ridge, LASSO, and why OLS is not always enough, without the mathematical intimidation

Most of us first learn regression through Ordinary Least Squares (OLS). It feels elegant and intuitive: fit a line, minimize error, and understand relationships in the data. And honestly, for small and clean datasets, OLS works beautifully. But the moment we step into real-world data, things become messy very quickly. Suddenly there are hundreds of variables, noisy predictors, overlapping information, and unstable results. The model that looked perfect in textbooks starts struggling in practice.

Too many variables: The Problem With Real-World Data

So what exactly goes wrong? Imagine trying to predict something using a huge dataset with too many predictors (100s or 1000s). Some variables may be strongly correlated with each other, some may barely matter, and some may simply add noise. OLS tries to fit all of them as accurately as possible, which often leads to overfitting and unstable coefficients. A tiny change in the data can completely change the model. This is where Ridge and LASSO regression come in. Instead of allowing coefficients to grow wildly, they “regularize” the model by penalizing large coefficients, helping the model become more stable and better at prediction. Or, in less terrifying words: Ridge and LASSO help the model focus more on important variables and less on less useful ones, making predictions more reliable.

So when to use LASSO vs Ridge?

What is the difference between the two? Ridge regression shrinks coefficients toward zero but usually keeps all variables in the model. It works best when most predictors contain at least some useful information, especially when variables are highly correlated. LASSO, on the other hand, can shrink some coefficients exactly to zero, effectively removing variables from the model. This makes it useful when you suspect that only a smaller subset of predictors truly matters. LASSO is especially useful when you want to identify which variables actually matter most. Since it can shrink some coefficients all the way to zero, it effectively removes less useful variables from the model. In that sense, LASSO is not just a prediction tool, it can also help with variable or model selection.

If you’re also starting your journey into statistics, machine learning, or data science, I’d love to hear what you struggle with most. I’m still learning too, and a big reason I write these posts is to make difficult concepts feel a little less intimidating. Share your questions, confusion, or topics you want explained — I genuinely read them carefully and would love to create content that helps others navigate this journey!


메타데이터
post_id
cd60654d08e7
slug
life-beyond-ordinary-least-squares-ols-when-to-use-ridge-and-lasso-regression-cd60654d08e7
url
https://medium.com/data-science-in-a-world-of-chaos/life-beyond-ordinary-least-squares-ols-when-to-use-ridge-and-lasso-regression-cd60654d08e7
canonical_url
https://medium.com/data-science-in-a-world-of-chaos/life-beyond-ordinary-least-squares-ols-when-to-use-ridge-and-lasso-regression-cd60654d08e7
author_url
https://medium.com/@moumitaghorai
status
ok
fetched_at
2026-09-05 10:19:41