We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a47e2b commit 0c32fcaCopy full SHA for 0c32fca
mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala
@@ -209,9 +209,9 @@ final class OneVsRestModel private[ml] (
209
// output the RawPrediction as vector
210
if (getRawPredictionCol != "") {
211
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)
+ val predArray = Array.fill[Double](numClasses)(0.0)
+ predictions.foreach { case (idx, value) => predArray(idx) = value }
+ Vectors.dense(predArray)
215
}
216
217
// output the index of the classifier with highest confidence as prediction
0 commit comments