SG-Akshay10 / Multiple-Linear-Regression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple-Linear-Regression

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.

image
where,

  • 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 :

MEAN SQUARE ERROR :

image

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

R-squared value:

image

Where,

  • yₚᵣₑ𝒹 is the predicted y value,
  • y̅ is the mean,
  • y is the actual value

About

License:Apache License 2.0


Languages

Language:Jupyter Notebook 100.0%