Question: Exercise 1. In this exercise, all the cross-validation simulations should involve a random split of the original sample into a training subsample corresponding to 90%

 Exercise 1. In this exercise, all the cross-validation simulations should involve

Exercise 1. In this exercise, all the cross-validation simulations should involve a random split of the original sample into a training subsample corresponding to 90% of the observations and a testing subsample corresponding to the remaining 10% of the observations. 1. Generate a sample of size n: 100 from the following model: a X is a uniform random variable over the interval (1, 1). o 5 is a normal random variable with mean 0 and standard deviation %. s is generated independently of X. a Y is a random variable linked to X through the following equation: F: 12X3 5X210X+s me now on, delete a and keep the generated X and 1' samples in an R. data frame object that you will call dp. We wil now consider a supervised learning setup where Y is the output variable and X is the input variable. Fron now on, enote the observations of the input variable by st- and those of the output variable by yt- {for i: 1, ..., n}. 2. Fit linear, quadratic and cubic regressions to the data in dp. Create three plots (for each model respectively] where each plot has 3.; on the X-axis and the true y,; and predicted 3% on the Yaxis. Compute the training and testing mean-squared errors for each model

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!