Solving logistic regression using second order newton methods