I am trying to make predictions with the model that I got back from MLlib on Spark. The goal is to generate tuples of (orinalLabelInData, predictedLabel). Then those tuples
Well, according to the official documentation you can simply zip predictions and labels like this:
predictions = model.predict(parsedTrainData.map(lambda x: x.features)) labelsAndPredictions = parsedTrainData.map(lambda x: x.label).zip(predictions)