Skip to content

Commit 557a797

Browse files
sboeschhuaweimengxr
authored andcommitted
[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 <[email protected]> Closes apache#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
1 parent cf38fe0 commit 557a797

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/src/main/scala/org/apache/spark/examples/mllib/PowerIterationClusteringExample.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ object PowerIterationClusteringExample {
6565
def main(args: Array[String]) {
6666
val defaultParams = Params()
6767

68-
val parser = new OptionParser[Params]("PIC Circles") {
68+
val parser = new OptionParser[Params]("PowerIterationClusteringExample") {
6969
head("PowerIterationClusteringExample: an example PIC app using concentric circles.")
7070
opt[Int]('k', "k")
7171
.text(s"number of circles (/clusters), default: ${defaultParams.k}")
@@ -76,9 +76,9 @@ object PowerIterationClusteringExample {
7676
opt[Int]("maxIterations")
7777
.text(s"number of iterations, default: ${defaultParams.maxIterations}")
7878
.action((x, c) => c.copy(maxIterations = x))
79-
opt[Int]('r', "r")
79+
opt[Double]('r', "r")
8080
.text(s"radius of outermost circle, default: ${defaultParams.outerRadius}")
81-
.action((x, c) => c.copy(numPoints = x))
81+
.action((x, c) => c.copy(outerRadius = x))
8282
}
8383

8484
parser.parse(args, defaultParams).map { params =>
@@ -154,3 +154,4 @@ object PowerIterationClusteringExample {
154154
coeff * math.exp(expCoeff * ssquares)
155155
}
156156
}
157+

0 commit comments

Comments
 (0)