diff options
author | sboeschhuawei <stephen.boesch@huawei.com> | 2015-04-15 13:28:10 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-04-15 13:28:10 -0700 |
commit | 557a797a273f1668065806cba53e19e6134a66d3 (patch) | |
tree | 5a5ae392b0b79fc846961032a75fd53657ca9680 /examples/src | |
parent | cf38fe04f8782ff4573ae106ec0de8e8d183cb2b (diff) | |
download | spark-557a797a273f1668065806cba53e19e6134a66d3.tar.gz spark-557a797a273f1668065806cba53e19e6134a66d3.tar.bz2 spark-557a797a273f1668065806cba53e19e6134a66d3.zip |
[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 <stephen.boesch@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
Diffstat (limited to 'examples/src')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala | 7 |
1 files changed, 4 insertions, 3 deletions
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 9f22d40c15..6d8b806569 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) } } + |