Question: 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.

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

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!