File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
mllib/src/main/scala/org/apache/spark/mllib/feature Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import org.apache.spark.SparkContext._
30
30
import org .apache .spark .annotation .Experimental
31
31
import org .apache .spark .api .java .JavaRDD
32
32
import org .apache .spark .mllib .linalg .{Vector , Vectors }
33
- import org .apache .spark .mllib .rdd .RDDFunctions ._
34
33
import org .apache .spark .rdd ._
35
34
import org .apache .spark .util .Utils
36
35
import org .apache .spark .util .random .XORShiftRandom
@@ -285,9 +284,9 @@ class Word2Vec extends Serializable with Logging {
285
284
286
285
val newSentences = sentences.repartition(numPartitions).cache()
287
286
val initRandom = new XORShiftRandom (seed)
288
- var syn0Global =
287
+ val syn0Global =
289
288
Array .fill[Float ](vocabSize * vectorSize)((initRandom.nextFloat() - 0.5f ) / vectorSize)
290
- var syn1Global = new Array [Float ](vocabSize * vectorSize)
289
+ val syn1Global = new Array [Float ](vocabSize * vectorSize)
291
290
var alpha = startingAlpha
292
291
for (k <- 1 to numIterations) {
293
292
val partial = newSentences.mapPartitionsWithIndex { case (idx, iter) =>
You can’t perform that action at this time.
0 commit comments