File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
mllib/src/main/scala/org/apache/spark/mllib/recommendation Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ class ALS private (
137137 this
138138 }
139139
140+ /** Sets a random seed to have deterministic results. */
140141 def setSeed (seed : Long ): ALS = {
141142 this .seed = seed
142143 this
@@ -419,14 +420,12 @@ class ALS private (
419420 implicitPrefs match {
420421 case false =>
421422 userXtX(us(i)).addi(tempXtX)
422- // dspr(1.0, x, userXtX(us(i)))
423423 SimpleBlas .axpy(rs(i), x, userXy(us(i)))
424424 case true =>
425425 // Extension to the original paper to handle rs(i) < 0. confidence is a function
426426 // of |rs(i)| instead so that it is never negative:
427427 val confidence = 1 + alpha * abs(rs(i))
428428 SimpleBlas .axpy(confidence - 1.0 , tempXtX, userXtX(us(i)))
429- // dspr(confidence - 1.0, x, userXtX(us(i)))
430429 // For rs(i) < 0, the corresponding entry in P is 0 now, not 1 -- negative rs(i)
431430 // means we try to reconstruct 0. We add terms only where P = 1, so, term below
432431 // is now only added for rs(i) > 0:
You can’t perform that action at this time.
0 commit comments