- Import the raw data set into a Pandas DataFrame.
- Clean the data and remove missing values. Drop any column that is not categorical or numeric. Let our target variable be MPG.highway again. Separate the independent variables from the dependent variable.
- Generate dummy variables for the categorical features.
- Create a training set that's 75% of your data set and a complementary test set with the remaining 25%. Specify random_state=0.
- Train the model using the LinearRegression class. Leave all parameters at their default values.
- Use your model to generate predictions on the test set, then create two scatter plots: one with predicted values against actual values, and another with residuals against predicted values. Print the coefficient of determination of the model with the .score() method.
- Print out the actual model in equation form, i.e., y = b + c1x1 + c2x2 + c3x3 + ....
-
Notifications
You must be signed in to change notification settings - Fork 0
adamwbrew/Multiple-Linear-Regression
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published