Skip to content
Snippets Groups Projects
Commit 557a797a authored by sboeschhuawei's avatar sboeschhuawei Committed by Xiangrui Meng
Browse files

[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
parent cf38fe04
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment