I've got an array with predictions and labels from logistic regression which looks like this:
labelAndPreds: org.apache.spark.rdd.RDD[(Double, Double)] =
MapPartitionsRDD[517] at map at <console>:52
scala> labelAndPreds.collect()
res2: Array[(Double, Double)] = Array((0.004106564139257318, 0.0),
(0.3641478408865635, 0.0), (0.9999258409695498, 1.0), (0.342287288060...
How can I save it on local disk in CSV format with two columns (one for labels and one for predictions)?