Question: Problem 1 (10 points) Part (a) [5 points]. Write a computer program which computes the LASSO solution path (for all in a given

Problem 1 (10 points) Part (a) [5 points]. Write a computer program

Problem 1 (10 points) Part (a) [5 points]. Write a computer program which computes the LASSO solution path (for all \ in a given range) by implementing the cyclic coordinate descent equations derived in lecture, and the speedup due to precomputation suggested immediately thereafter in the lecture notes. Part (b) [5 points]. Consider a linear model with known coefficients, such as y = 3x 17x2 + 5x3 + , ~ N(0,0), = 1 From this linear model, use a random number generator to generate a simulated data set of N = 1000 pairs (x,y) according to the model. Verify that, on this simulated data set, you get the same solution path as the glmnet program by Hastie, Tibshirani and Friedman. Note that glmnet is a package you can download in R. If you are running Linux, you may also use the python package discussed on Trevor Hastie's website, but the python version does not run on Windows.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure lets break down the tasks step by step for both parts a and b Part a Write a LASSO Solution Pat... View full answer

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 Databases Questions!