Multiple Linear Regression
Great work! Let’s review the concepts before you move on:
- Multiple Linear Regression uses two or more variables to make predictions about another variable:
- Multiple linear regression uses a set of independent variables and a dependent variable. It uses these variables to learn how to find optimal parameters. It takes a labeled dataset and learns from it. Once we confirm that it’s learned correctly, we can then use it to make predictions by plugging in new
- We can use scikit-learn’s
LinearRegression()to perform multiple linear regression.
- Residual Analysis is used to evaluate the regression model’s accuracy. In other words, it’s used to see if the model has learned the coefficients correctly.
linear_model.LinearRegressioncomes with a
.score()method that returns the coefficient of determination R² of the prediction. The best score is 1.0.
We have made an applet using the multiple linear regression model that you built! Have fun!