aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/test/scala/org
diff options
context:
space:
mode:
authorHolden Karau <holden@pigscanfly.ca>2015-10-07 12:00:56 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-10-07 12:00:56 -0700
commit5be5d247440d6346d667c4b3d817666126f62906 (patch)
tree7a2be64c9c4187f520637b61b9c156f3a664bf9b /mllib/src/test/scala/org
parent6ca27f855075d65eb4535f1f2ed4fc9e68744231 (diff)
downloadspark-5be5d247440d6346d667c4b3d817666126f62906.tar.gz
spark-5be5d247440d6346d667c4b3d817666126f62906.tar.bz2
spark-5be5d247440d6346d667c4b3d817666126f62906.zip
[SPARK-9841] [ML] Make clear public
It is currently impossible to clear Param values once set. It would be helpful to be able to. Author: Holden Karau <holden@pigscanfly.ca> Closes #8619 from holdenk/SPARK-9841-params-clear-needs-to-be-public.
Diffstat (limited to 'mllib/src/test/scala/org')
-rw-r--r--mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala5
1 files changed, 5 insertions, 0 deletions
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 dfab82c8b6..a2ea279f5d 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
@@ -156,6 +156,11 @@ class ParamsSuite extends SparkFunSuite {
solver.clearMaxIter()
assert(!solver.isSet(maxIter))
+ // Re-set and clear maxIter using the generic clear API
+ solver.setMaxIter(10)
+ solver.clear(maxIter)
+ assert(!solver.isSet(maxIter))
+
val copied = solver.copy(ParamMap(solver.maxIter -> 50))
assert(copied.uid === solver.uid)
assert(copied.getInputCol === solver.getInputCol)