attached are a word doc with instructions and a picture of t
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →attached are a word doc with instructions and a picture of the train test process and excel file with dataIn this assignment you use model selection to evaluate regression models of different sizes and select the best one.The following function prints the performance of any given model. You don’t need to change it, just run it.Step 1: Load the ToyotaCorolla dataset into a dataframe and examine its shape.]Step 2: Create dummy variables for Fuel_TypeStep 3: Create X and y variables which contain your independent and dependent variables respectively. Use Price for y and for X use all columns except ‘Price’, ‘Color’,’Id’, ‘Model’,’Mfg_Month’, ‘Mfg_Year’,’Fuel_Type_Petrol’.Step 4: Split your data into training and test partitionsStep 5: Normalize your independent variables using mean and standard deviation (z-score)Step 6: Write a for loop that finds and prints the best models of sizes 1 through 10 using RFE on the normalized datasetStep 7: Select the best model. You can ignore improvements to adjusted r2 which are <1%. After you select the best model, slice the features (columns) of the best model from non-normalized datasetStep 8: Run a regression model on the dataframe you created in the previous step and report the coefficinets.These coefficients are from the dataset with real scales and should make sense.
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds