Starting logistic regression algorithm.