vectorization of predictions in logistic regression