Mathematics And Theory Behind The Magic of Linear Regression

Introduction "Machine learning is the new electricity", is something which we have heard once in our lifetime. From the use of photos app to social media there is some use of it in almost every aspect of our day to day life. Today lets look at one of the basic machine learning algorithm which almost anyone can learn and use to predict new outcomes of linear data. Before moving on to the actual algorithm lets give a quick look at high school maths which many of us may remember. The equation of a straight line : Y = mx +b The distance between two points(x 1 ,y 1 and x 2 ,y 2 ) = √(x 2 -x 1 ) 2 +(y 2 -y 1 ) 2 What is Linear Regression? Linear regression is a regression algorithm to find a best fitting line to the given linearly related data-set. Such data set could be the house price with house features or could be as simple as the marks obtained by a student per hours they invest in their studies. Lets visualize a data set where we plot the students mark...