spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [02/50] git commit: Main method added for svd
Date Wed, 22 Jan 2014 22:01:45 GMT
Main method added for svd


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/fe1a132d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/fe1a132d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/fe1a132d

Branch: refs/heads/master
Commit: fe1a132d403e301a674da6f4af7163df210ec2af
Parents: 1a21ba2
Author: Reza Zadeh <rizlar@gmail.com>
Authored: Thu Dec 26 18:13:21 2013 -0500
Committer: Reza Zadeh <rizlar@gmail.com>
Committed: Thu Dec 26 18:13:21 2013 -0500

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/fe1a132d/mllib/src/main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala b/mllib/src/main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala
index be8ccff..7bb393d 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/linalg/sparsesvd.scala
@@ -128,10 +128,10 @@ object SVD {
 		}
 
 		val (u, s, v) = SVD.sparseSVD(data, m, n, min_svalue)
-    println("Computed " + s.size + " singular values and vectors")
-		u.saveAsText(output_u)
-		s.saveAsText(output_s)
-		v.saveAsText(output_v)
+    println("Computed " + s.toArray.length + " singular values and vectors")
+		u.saveAsTextFile(output_u)
+		s.saveAsTextFile(output_s)
+		v.saveAsTextFile(output_v)
     System.exit(0)
   }
 }


Mime
View raw message