Python linear regression (Show off) (blog python)

 Python linear regression

   Hey guys, today I'm gonna be doing another show-off blog. And I'm gonna be showing off a very cool math-related python script! And just as last time I will link a video on how you can also make this and a git link to the code. And I also might be making a how-to on this project soon. So if you want to see that leave a comment down below and let me know what you think I should do. And with that let's into it!

What I made?

So if you don't already know what linear regression is then you are problem wondering, what is linear regression? And ill save you all the trouble of all the math because if you want to check that out you can find countless tutorials on it. So ill just explain it as basic as I can. The google definition for linear regression is "In statistics, linear regression is a linear approach to modeling the relationship between a scalar response and one or more explanatory variables (also known as dependent and independent variables)" In other words linear regions find the best fit line in a linear data set. This line would be in the middle of the data and be as close to all of the data points as possible. If this sounds cool to you and you want to learn more make sure to leave a comment and I can push you in the right direction!

Show off!

Ok enough talk now, let's get into the fun part! the show-off.
Pretty cool right? just how I explained in the last section the code took some data points and found the best fit line the blue line) using linear regression!

Here is a close-up of the graph. and you may notice that it has an accuracy at the top! again ill save you having to read all about the math so ill just explain the basics. The accuracy is calculated using something called squared error! It is basically how far away this best fit line is from the rest of the data. The more points that are far away the lower the accuracy.

Final thoughts

And that's all for today's blog! It's been great fun and I hope you got some knowledge or entertainment out of this one. And I know I say this every single blog but I do actually genuinely mean it!!! A comment or sub or share would mean the world to me. Espaillity in my starting times with my first few blogs it really helps and I do notice you! thank you. And per routine, if you have any thoughts or questions id be happy to answer them. And with that keep on creating and exploring and ill be heading off for now!

(BTW: code is in GitHub link just below! and video in the comment section! (drop a comment while you're down there too!))

Git and socials





thank you.

Comments

  1. Hope you enjoyed this one! if you did check out out other post just below!

    ReplyDelete

Post a Comment

Popular posts from this blog

5 amazing sites where you can build your coding knowledge!