Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Shortlist Promising Models In this section, you will fit and compare three regression models to your transformed data, both with and without the G 1
Shortlist Promising Models
In this section, you will fit and compare three regression models to your transformed data, both with and without the GG columns, using crossvalidation. Follow the steps below, using the specified variable names.
Initialize Three Regression Models
Linear Regression
Support Vector Machine SVM Regression
Lasso Regression
Compare Models with CrossValidation
Using the above models, perform crossvalidation on each model using both sets of transformed data with and without GG columns
Instructions for Submission
Initialize the Models: Instantiate a Linear Regression, SVM Regression, and Lasso Regression model.
Use the specified variable names for the respective models:
linreg
svmreg
lassoreg
CrossValidation: Using both sets of transformed data with and without GG columns perform fold crossvalidation for each model using RMSE as the metric.
You will run crossvalidation six times eg crossvalidation of the linear regression model with the GG data, crossvalidation of the linear regression model without the GG data, etc.
Use the specified variable names to save each respective array of scores:
cvscoreslinregwithgrades
cvscoreslinregwithoutgrades
cvscoressvmwithgrades
cvscoressvmwithoutgrades
cvscoreslassowithgrades
cvscoreslassowithoutgrades
Use the specified variable names to save the mean of each crossvalidation array and print it to view your mean scores:
rmselinregwithgrades
rmselinregwithoutgrades
rmsesvmwithgrades
rmsesvmwithoutgrades
rmselassowithgrades
rmselassowithoutgrades
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started