From 2fc164163656eeffba4b2bd3dc746b117c15de22 Mon Sep 17 00:00:00 2001 From: Xiangrui Meng Date: Wed, 12 Mar 2014 17:32:24 -0700 Subject: [PATCH] remove commented code --- .../main/scala/org/apache/spark/mllib/recommendation/ALS.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala index dc28ee38ed509..1f06ea597063d 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala @@ -137,6 +137,7 @@ class ALS private ( this } + /** Sets a random seed to have deterministic results. */ def setSeed(seed: Long): ALS = { this.seed = seed this @@ -419,14 +420,12 @@ class ALS private ( implicitPrefs match { case false => userXtX(us(i)).addi(tempXtX) - // dspr(1.0, x, userXtX(us(i))) SimpleBlas.axpy(rs(i), x, userXy(us(i))) case true => // Extension to the original paper to handle rs(i) < 0. confidence is a function // of |rs(i)| instead so that it is never negative: val confidence = 1 + alpha * abs(rs(i)) SimpleBlas.axpy(confidence - 1.0, tempXtX, userXtX(us(i))) - // dspr(confidence - 1.0, x, userXtX(us(i))) // For rs(i) < 0, the corresponding entry in P is 0 now, not 1 -- negative rs(i) // means we try to reconstruct 0. We add terms only where P = 1, so, term below // is now only added for rs(i) > 0: