From 3c28883c55cc977d68d504805973877d3ea02e54 Mon Sep 17 00:00:00 2001 From: NewBoLing Date: Sat, 20 May 2017 19:39:27 +0800 Subject: [PATCH] Update SVDPlusPlus.scala I think updated information of updateY incorrectly send to source vertice. the original code like the below. ctx.sendToSrc((updateP, updateY, (err - conf.gamma6 * usr._3) * conf.gamma1)) In fact, usr._2 store pu + |N(u)|^(-0.5)*sum(y). we have already updated the part of y in usr._2 through sending the message to destination vertex, and this method will effect the part of y in usr._2, but the part of pu is never updated. so we should send updateP to source vertex not updateY. --- .../main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphx/src/main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala b/graphx/src/main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala index 59fdd855e6f3..84526cb3e7c1 100644 --- a/graphx/src/main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala +++ b/graphx/src/main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala @@ -118,7 +118,7 @@ object SVDPlusPlus { val updateY = q.clone() blas.dscal(rank, err * usr._4 * conf.gamma2, updateY, 1) blas.daxpy(rank, -conf.gamma7 * conf.gamma2, itm._2, 1, updateY, 1) - ctx.sendToSrc((updateP, updateY, (err - conf.gamma6 * usr._3) * conf.gamma1)) + ctx.sendToSrc((updateP, updateP, (err - conf.gamma6 * usr._3) * conf.gamma1)) ctx.sendToDst((updateQ, updateY, (err - conf.gamma6 * itm._3) * conf.gamma1)) }