Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercises Elements of Statistical Learning Exercises 7.4 and 7.5 (5 points each) Implementation (40 points) Attached to this assignment are two scripts. One generates data
Exercises Elements of Statistical Learning Exercises 7.4 and 7.5 (5 points each) Implementation (40 points) Attached to this assignment are two scripts. One generates data that is a sawtooth function plus noise sampled at random points betweeen -10 and 10. The size of the sample and magnitude of the noise are left as parameters. I have generated one sample with 10000 points and noise with a standard deviation of 0.1. The other script fits an harmonic regression (least-squares fit of sines and cosines as shown in class earlier). This script simply prints a string representation of the model as well as the root mean squared error of the fitted model. Your task is to implement model selection for this problem using 1. AIC 2. K-fold cross validation for k = 5 and 10. 3. Bootstrapping Some questions to answer: 1. Do you get the same optimal parameters with each method? 2. Which method(s) tend to give you higher bias and lower variance and vice versa? I would encourage you to generate some data of your own of different sizes with varying amounts of noise added to the signal. Observe how different data sets yield different answers
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