Implemented simple logistic regression