Is linear regression and ordinary least squares (OLS) the same thing ?

Brijesh Goyal
2 min readFeb 13, 2021

--

Photo by Jon Tyson on Unsplash

Linear regression is a vast term that just says we are finding a relationship between the dependent and independent variable(s), no matter what technique(or mathematics) we are using.

OLS is just one of the technique to do linear regression.

Lets say,
error(e) = (observed value — predicted value)

Observed valuesblue dots in picture below.
predicted values →points on the line(vertically below to the observed values)

Figure 1: Shows predicted line and Observer values(blue dots)

The vertical lines above represent error `e`.

We square them -> add them together and get total err.

And we try to reduce this total error using other methods like gradient descent.

For OLS, as the name says (ordinary least squared method), here we reduce the sum of all e² i.e. we try to make the error least.

I hope now you get the point that OLS is just one of the many techniques to implement linear regression.

I hope it was helpful!

You can find me on Linkedin here.
brijeshgoyal0808@gmail.com

Thanks for reading :)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Brijesh Goyal
Brijesh Goyal

Written by Brijesh Goyal

I am a machine learning enthusiast and love to do coding. Currently on my path to explore more things.

No responses yet

Write a response