Question
#SHARE R CODES Question 1: Use the College data set to predict the number of applications received using the predictor variables. Please use the following
#SHARE R CODES
Question 1: Use the "College" data set to predict the number of applications received using the predictor variables. Please use the following codes to load the data set and to get a description about the data set.
library(ISLR)
data("College")
?College
Split the data set into a training and a test set.
Use a 5-fold cross-validation approach with the best subset selection process. Report the model that you obtain. Report the testing MSE.
Fit a ridge regression model on the training set, with 'tuning parameter' chosen by cross-validation. Report the testing MSE.
Fit a Lasso regression model on the training set, with 'tuning parameter' chosen by cross-validation. Report the testing MSE. How many non-zero coefficient estimates?
Comment on the results obtained. Which model would you choose?
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