diff options
author | Jianping J Wang <jianping.j.wang@gmail.com> | 2013-12-31 22:01:02 +0800 |
---|---|---|
committer | Jianping J Wang <jianping.j.wang@gmail.com> | 2013-12-31 22:01:02 +0800 |
commit | 61e6671f5abbbd0a96cc7359ea6302b84e6e9248 (patch) | |
tree | c124ce4caeefc4c21eff2bc33a788279e380d23e | |
parent | 12c26d7fb912f07a9e4a9a3de532e0c53bc667a9 (diff) | |
download | spark-61e6671f5abbbd0a96cc7359ea6302b84e6e9248.tar.gz spark-61e6671f5abbbd0a96cc7359ea6302b84e6e9248.tar.bz2 spark-61e6671f5abbbd0a96cc7359ea6302b84e6e9248.zip |
fix test bug
-rw-r--r-- | graph/src/main/scala/org/apache/spark/graph/algorithms/Svdpp.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graph/src/main/scala/org/apache/spark/graph/algorithms/Svdpp.scala b/graph/src/main/scala/org/apache/spark/graph/algorithms/Svdpp.scala index e7e8d00d9a..18395bdc5f 100644 --- a/graph/src/main/scala/org/apache/spark/graph/algorithms/Svdpp.scala +++ b/graph/src/main/scala/org/apache/spark/graph/algorithms/Svdpp.scala @@ -28,7 +28,7 @@ object Svdpp { * @return a graph with vertex attributes containing the trained model */ - def run(edges: RDD[Edge[Double]], conf: SvdppConf): Graph[(RealVector, RealVector, Double, Double), Double] = { + def run(edges: RDD[Edge[Double]], conf: SvdppConf): (Graph[(RealVector, RealVector, Double, Double), Double], Double) = { // generate default vertex attribute def defaultF(rank: Int): (RealVector, RealVector, Double, Double) = { @@ -95,9 +95,9 @@ object Svdpp { Iterator((et.dstId, err)) } val t3 = g.mapReduceTriplets(mapTestF(conf, u), (g1: Double, g2: Double) => g1 + g2) - g.outerJoinVertices(t3) { (vid: Vid, vd: (RealVector, RealVector, Double, Double), msg: Option[Double]) => + g = g.outerJoinVertices(t3) { (vid: Vid, vd: (RealVector, RealVector, Double, Double), msg: Option[Double]) => if (msg.isDefined) (vd._1, vd._2, vd._3, msg.get) else vd } - g + (g, u) } } |