Github user MLnick commented on a diff in the pull request: https://github.com/apache/spark/pull/20164#discussion_r161535696 --- Diff: mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala --- @@ -170,21 +170,24 @@ final class OneVsRestModel private[ml] ( newDataset.persist(StorageLevel.MEMORY_AND_DISK) } + // temporary column to store intermediate raw prediction + val tmpRawPredictionColName = "rawPrediction_" + UUID.randomUUID().toString + // update the accumulator column with the result of prediction of models val aggregatedDataset = models.zipWithIndex.foldLeft[DataFrame](newDataset) { case (df, (model, index)) => - val rawPredictionCol = model.getRawPredictionCol - val columns = origCols ++ List(col(rawPredictionCol), col(accColName)) + val columns = origCols ++ List(col(tmpRawPredictionColName), col(accColName)) --- End diff -- This line doesn't need to be in the `foldLeft` block any longer?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org