$30
1. Consider any dataset. You can create own or use any publicly available dataset. Pretend the goal is to predict the target variable.
(a) Run ridge regression (RR) on the data.
i. Find the λ value that minimizes the cross validated error/training error.
ii. Provide plots for both the cross validated error/training error and the coefficients as functions of λ .
(b) Run lasso on the data.
i. Find the λ value that minimizes the cross validated error/training error.
ii. Provide plots for both the cross validated error/training error and the coefficients as functions of λ .
(c) Examine the model coefficients for the chosen λ. You can use either pair plot or bar diagram to visualize the model coefficients.
–