Linear Regression is a simple machine learning model for regression problems, i.e., when the target variable is a real value.

# Example

Let's start with an example — suppose we have a dataset with information about the area of a house (in square feet) and its price (in thousands of dollars) and our task is to build a machine learning model which can predict the price given the area. Here is what our dataset looks like

If we plot our data, we might get something similar to the following: