Simple implementation of logistic regression

With and without regularization