Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored 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

Mathematics for Economics and Business

Authors: Ian Jacques

9th edition

129219166X, 9781292191706 , 978-1292191669

More Books

Students also viewed these Mathematics questions

Question

Find the first four terms of the indicated expansions. (2a x 1 ) 11

Answered: 1 week ago