You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2015/04/15 22:28:14 UTC

spark git commit: [SPARK-6937][MLLIB] Fixed bug in PICExample in which the radius were not being accepted on c...

Repository: spark
Updated Branches:
  refs/heads/master cf38fe04f -> 557a797a2


[SPARK-6937][MLLIB] Fixed bug in PICExample in which the radius were not being accepted on c...

 Tiny bug in PowerIterationClusteringExample in which radius not accepted from command line

Author: sboeschhuawei <st...@huawei.com>

Closes #5531 from javadba/picsub and squashes the following commits:

2aab8cf [sboeschhuawei] Fixed bug in PICExample in which the radius were not being accepted on command line


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

Branch: refs/heads/master
Commit: 557a797a273f1668065806cba53e19e6134a66d3
Parents: cf38fe0
Author: sboeschhuawei <st...@huawei.com>
Authored: Wed Apr 15 13:28:10 2015 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Wed Apr 15 13:28:10 2015 -0700

----------------------------------------------------------------------
 .../examples/mllib/PowerIterationClusteringExample.scala      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/557a797a/examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala b/examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala
index 9f22d40..6d8b806 100644
--- a/examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala
+++ b/examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala
@@ -65,7 +65,7 @@ object PowerIterationClusteringExample {
   def main(args: Array[String]) {
     val defaultParams = Params()
 
-    val parser = new OptionParser[Params]("PIC Circles") {
+    val parser = new OptionParser[Params]("PowerIterationClusteringExample") {
       head("PowerIterationClusteringExample: an example PIC app using concentric circles.")
       opt[Int]('k', "k")
         .text(s"number of circles (/clusters), default: ${defaultParams.k}")
@@ -76,9 +76,9 @@ object PowerIterationClusteringExample {
       opt[Int]("maxIterations")
         .text(s"number of iterations, default: ${defaultParams.maxIterations}")
         .action((x, c) => c.copy(maxIterations = x))
-      opt[Int]('r', "r")
+      opt[Double]('r', "r")
         .text(s"radius of outermost circle, default: ${defaultParams.outerRadius}")
-        .action((x, c) => c.copy(numPoints = x))
+        .action((x, c) => c.copy(outerRadius = x))
     }
 
     parser.parse(args, defaultParams).map { params =>
@@ -154,3 +154,4 @@ object PowerIterationClusteringExample {
     coeff * math.exp(expCoeff * ssquares)
   }
 }
+


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org