Training a Simple Logistic Model in Python