Linear Regression, Logistic Regression and Regularization