Logistic Regression Python Code From Blue