Skip to content

Commit 0c32fca

Browse files
committed
change the tmp array name
1 parent 2a47e2b commit 0c32fca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ final class OneVsRestModel private[ml] (
209209
// output the RawPrediction as vector
210210
if (getRawPredictionCol != "") {
211211
val rawPredictionUDF = udf { (predictions: Map[Int, Double]) =>
212-
val myArray = Array.fill[Double](numClasses)(0.0)
213-
predictions.foreach { case (idx, value) => myArray(idx) = value }
214-
Vectors.dense(myArray)
212+
val predArray = Array.fill[Double](numClasses)(0.0)
213+
predictions.foreach { case (idx, value) => predArray(idx) = value }
214+
Vectors.dense(predArray)
215215
}
216216

217217
// output the index of the classifier with highest confidence as prediction

0 commit comments

Comments
 (0)