As one of the most basic concepts in Data Science, I thought that it would be a good idea to cover the fundamentals of how linear regression works.
Here’s a link to the Github Repo:
sarvasvkulpati/LinearRegression
Linear regression is a method for approximating a linear relationship between two variables. While that may sound complicated, all it really means is that it takes some input variable, like the age of a house, and finds out how it’s related to another variable, for example, the price it sells at.
Linear regression takes some input variable, like the age of a house, and finds out how it’s related to another variable, for example, the price it sells at.
We use it when the data has a linear relationship, which means that when you plot the points on a graph, the data lies approximately in the shape of a straight line.
The goal of linear regression is to find a line that best fits a set of data points.
In terms of general intuition, linear regression guesses a line that fits the data, sees how incorrect it was, and then adjusts itself to become slightly more accurate. It repeats this process until it’s reduced the error as much as possible.
Linear Regression involves a couple of steps: