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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!