From 6bb6d775b10c1807d1a3144fd6b51c540691fb82 Mon Sep 17 00:00:00 2001 From: DB Tsai Date: Tue, 2 Jun 2015 15:09:18 -0700 Subject: [PATCH] fix suite and remove duplicated setMaxIter --- .../apache/spark/examples/ml/LogisticRegressionExample.scala | 1 - .../src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala b/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala index 8559930493bfd..b12f833ce94c8 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/LogisticRegressionExample.scala @@ -135,7 +135,6 @@ object LogisticRegressionExample { .setElasticNetParam(params.elasticNetParam) .setMaxIter(params.maxIter) .setTol(params.tol) - .setMaxIter(params.maxIter) stages += lor val pipeline = new Pipeline().setStages(stages.toArray) diff --git a/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala index f80e7749098a5..350cc81ba699e 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala @@ -27,7 +27,7 @@ class ParamsSuite extends SparkFunSuite { import solver.{maxIter, inputCol} assert(maxIter.name === "maxIter") - assert(maxIter.doc === "max number of iterations (>= 0)") + assert(maxIter.doc === "maximum number of iterations (>= 0)") assert(maxIter.parent === uid) assert(maxIter.toString === s"${uid}__maxIter") assert(!maxIter.isValid(-1))