Logistic Regression classifier written in python