Question
Cross Validation assignment Use the Boston data for regression cross validation and Weekly data for the Classification cross validation. i.e. implement lines 1-76 on the
Cross Validation assignment
Use the Boston data for regression cross validation and Weekly data for the Classification cross validation.
i.e. implement lines 1-76 on the Boston dataset from MASS. Dependent variable medv, run a non-linear model with lstat or another variable of your choice. When you are doing the validation set approach, split Training Test at 70/30. To figure out how much should be in the training use dim command to see the number of observations. Then train command will be Train(Total observations, Training observations), line 8.
Lines 77 through 125 are on Classification models. Use Weekly data from ISLR2 for this part of the code, use Direction as the dependent variable.
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