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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f588bce8f9f_35666f588bc762e5.jpg)
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
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
Get step-by-step solutions from verified subject matter experts
