Difference between Linear Regression process explained in the video and Linear Regression using sklearn

What is the difference between performing linear regression like this and perofrming linear regression using sklearn?

Hey, I think you asked this question on Youtube too. I will just copy-paste the answer from there.

There is not much difference as such, it completely depends on what you are most familiar with, nevertheless, there are some perks on doing Linear Regression with both the libraries.
Advantage of using Pytorch for Linear Regression

  • It’s Faster than Sklearn
  • Pytorch is a deep learning library so if you are familiar with the basics you can apply DL using Pytorch too.
  • It is much more customizable than Sklearn.
  • Though I think you won’t need GPU for LR you can still use the Power of GPU’s for faster training in Pytorch.

Advantage of using Sklearn for LR:

  • It is easy to learn and use
  • You don’t have to write long codes while using sklearn but less customizable.
  • More beginner-friendly to use than Pytorch.

PS: I added some extra points.

Thanks for the help!! Was really informative.

1 Like