Question: Regularization Methods: Consider the function f(x)=sin2x+2cosx on the interval [0,5]. In answering this question, follow the example we presented in class. Moreover, you need not
![Regularization Methods: Consider the function f(x)=sin2x+2cosx on the interval [0,5]. In](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4f2b96efe1_95266f4f2b8dc1af.jpg)
Regularization Methods: Consider the function f(x)=sin2x+2cosx on the interval [0,5]. In answering this question, follow the example we presented in class. Moreover, you need not split the data into train and test subsets. (a) Pick at least 50 sample points from the interval [0,5]. For the sample points, add some random noise - chosen from a normal distribution - to the target y=f(x). Record the values of x and y in a data-frame. (b) Construct all monomials of x up to power 11. (c) Perform the ordinary polynomial regression (up to order 11) to predict y. Present the coefficients of regression for all monomials. (d) Repeat part (c) with the Ridge regression. What value would you consider for the penalty factor? Present the coefficients of regression for all monomials and compare them to coefficients obtained in part (c). (e) Repeat part (c) with the LASSO regression. What value would you consider for the penalty factor? Present the coefficients of regression for all monomials and compare them to coefficients obtained in parts (c) and (d). (f) If the LASSO regression you performed in part (e) is viewed as a feature selection principle, what monomials are the most significant ones for the target y ? (g) Compare your answer in part (f) with the Taylor expansion of f(x) around 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
