Multiple linear regression is used to estimate the relationship between two or more independent variables and one dependent variable. You can use multiple linear regression when you want to know:
- How strong the relationship is between two or more independent variables and one dependent variable.
- The value of the dependent variable at a certain value of the independent variables.
- Y : the dependent or response variable
- B0 : this is the y-intercept.
- B1X1 : (B1) is the coefficient of the first independent variable (X1) in your model.
- e : this is the model error
Our basic agenda is to implement a multiple linear regression program using numpy and pandas and sklearn libraries.
Then check the efficiency of the model using the following metrics :
where,
- 𝑁 is the total number of observations (data points)
- yᵢ is the actual value of an observation and y^ is the predicted value
- J is the cost function which is the mean squared error in this case
Where,
- yₚᵣₑ𝒹 is the predicted y value,
- y̅ is the mean,
- y is the actual value