Implemented logistic regression using cross validation sets