DEV Community

Cover image for Introduction to Linear Regression in Python

Introduction to Linear Regression in Python

Lorraine on February 08, 2019

Linear regression is a basic predictive analytics technique that uses historical data to predict an output variable. It is popular for predictive m...
Collapse
 
rpalo profile image
Ryan Palo

Thank you so much for showing how to do it manually. There are so many articles showing different data analysis techniques, but a lot of them start off with:

We don't even have to know how it works! Just chuck your data into this magic box! And out comes an answer that might be sort of right. But you'll never know!

This was sooooo nice to be able to sit through a nice, clear walkthrough of the math behind it with helpful graphs and visuals. It makes me so happy. Thanks again :)

Collapse
 
lorrli274 profile image
Lorraine

I'm glad you enjoyed it! :) We'll be releasing a lot more tutorials in the upcoming months...is there anything in particular you'd like to learn?

Collapse
 
rpalo profile image
Ryan Palo

Not specifically, but I would love to see more posts with more background on common data science algorithms and how they work.

Collapse
 
zeljkobekcic profile image
TheRealZeljko

There is one thing I would have liked to see:

Yₑ = α + β₁X₁ + β₂X₂ + … + βₚXₚ, where p is the number of predictors.

When you provided this formula/definition I would have liked to read something like this:

"It is called linear regression because it is linear in its parameters β"

or so. My ML/DL professor mentioned it on every of his slides about linear regression. Therefore an equation like
f(x) = ∑ βi x2
would be linear too, because it is linear in its parameters (β)

Beside that I really like your explanations! Definitely would like to read more about advanced topics :)

Collapse
 
lorrli274 profile image
Lorraine

That's a great point. Thank you :) more coming soon!

Collapse
 
hkab profile image
HKAB

As a beginner, i think your post is really clear. Nice work, keep going!

Collapse
 
lorrli274 profile image
Lorraine

Thanks! Glad you liked it :)