SPARK-6710 GraphX Fixed Wrong initial bias in GraphX SVDPlusPlus

Author: Michael Malak <michaelmalak@yahoo.com>

Closes #5464 from michaelmalak/master and squashes the following commits:

9d942ba [Michael Malak] SPARK-6710 GraphX Fixed Wrong initial bias in GraphX SVDPlusPlus
This commit is contained in:
Michael Malak 2015-04-11 21:01:23 -07:00 committed by Reynold Xin
parent dea5dacc5d
commit 1205f7ea61

View file

@ -93,7 +93,7 @@ object SVDPlusPlus {
val gJoinT0 = g.outerJoinVertices(t0) {
(vid: VertexId, vd: (Array[Double], Array[Double], Double, Double),
msg: Option[(Long, Double)]) =>
(vd._1, vd._2, msg.get._2 / msg.get._1, 1.0 / scala.math.sqrt(msg.get._1))
(vd._1, vd._2, msg.get._2 / msg.get._1 - u, 1.0 / scala.math.sqrt(msg.get._1))
}.cache()
materialize(gJoinT0)
g.unpersist()