Refactoring the SGD regression and using regularization.