Python ML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10

Python ML

how can i make manually best fit line in linear regression ? they suggested sklearn library but how can it be done manually ?

9th Sep 2020, 1:44 AM
Rajababu Shah
Rajababu Shah - avatar
1 Answer
+ 7
It's too hard to calculate the y-intercept and slope for a data that is not consistent, i.e. when we are plotting the data the points are not collinear! Python has this special library that allows to accomodate so many variations in the data! Since, the data we get is not at all necessarily consistent so we cannot say that we can calculate it! Here's some explanation about this topic! https://youtu.be/Q81RR3yKn30 We can only calculate for collinear points! As shown here 👇 https://youtu.be/5x-bM682Nvw Ig there might be a way through which we can manually get the formula but that might be too tedious and hard or maybe inaccurate to calculate! Here's a video to calculate the line for a small data that is not consistent! https://youtu.be/JvS2triCgOY
9th Sep 2020, 4:21 AM
Namit Jain
Namit Jain - avatar