Question: (b) Predicting the output 1.b.(i) Linear regression Use linear regression to predict the MSRP from year, acceleration, and MPG. Add a new column to the
(b) Predicting the output 1.b.(i) Linear regression Use linear regression to predict the MSRP from year, acceleration, and MPG. Add a new column to the train and test dataframes called linear_pred with the predictions from linear regression. Hint: throughout this lab, you should use the default values of all parameters for all models we're experimenting with. Hint: for this lab, you don't need to worry about pandas warnings about setting a value on a copy of a slice
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
