How Logistic Regression Works