Implementing Lasso and Ridge Regression