Binary classification with logistic.
Code factorization.