View the step-by-step solution to:

following questions: 1. Divide the dataset into training and testing datasets. As we did in class, re-run your regression from the earlier problem on...

This question was created from Homework-1.pdf https://www.coursehero.com/file/40405500/Homework-1pdf/

40405500-304826.jpeg

missing answers! question 10

40405500-304826.jpeg

following questions: 1. Divide the dataset into training and testing datasets. As we did in class, re—run your
regression from the earlier problem on the training set. How does it do on the test set?
Use the residual mean squared error as a measure, you can get the number of degrees
of freedom from lm. 2. Use glm net to apply lasso regression with cross—validation. What value of lambda gives
the best model here and what is the model? What variables are selected by the lasso
regression? 3. Use this model to predict the test set. Does the rmse improve over ordinary regression? 4. Finally, plot the residuals vs the fitted (Le. predicted values}, you can do this with
plotlfitted, residual) if you’ve calculated both. Does the lasso regression add any
significant bias into the model? Note that one thing that can be sacrificed in regularized
regression is bias.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question