Logistic regression in Spark