Description
Assignment -2
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.
- Find the λ value that minimizes the cross validated error/training error.
- Provideplotsforboththecrossvalidatederror/trainingerrorandthecoefficientsas functions of λ .
(b) Run lasso on the data.
- Find the λ value that minimizes the cross validated error/training error.
- Provideplotsforboththecrossvalidatederror/trainingerrorandthecoefficientsas functions of λ .
(c) Examine the model coefficients for the chosen λ. You can use either pair plot or bar
diagram to visualize the model coefficients.
—– Page 1 of 1 —–