Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics Picturing The World

Authors: Betsy Farber, Ron Larson

7th Global Edition

1292260467, 978-1292260464

Students also viewed these Mathematics questions