spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [SPARK-14758][ML] Add checking for StepSize and Tol
Date Mon, 25 Apr 2016 08:31:16 GMT
Repository: spark
Updated Branches:
  refs/heads/master 761fc46c7 -> e6f954a57


[SPARK-14758][ML] Add checking for StepSize and Tol

## What changes were proposed in this pull request?
add the checking for StepSize and Tol in sharedParams

## How was this patch tested?
Unit tests

Author: Zheng RuiFeng <ruifengz@foxmail.com>

Closes #12530 from zhengruifeng/ml_args_checking.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e6f954a5
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e6f954a5
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e6f954a5

Branch: refs/heads/master
Commit: e6f954a5799d0996bf9f22e0fb67a2f0568b57a4
Parents: 761fc46
Author: Zheng RuiFeng <ruifengz@foxmail.com>
Authored: Mon Apr 25 10:30:55 2016 +0200
Committer: Sean Owen <sowen@cloudera.com>
Committed: Mon Apr 25 10:30:55 2016 +0200

----------------------------------------------------------------------
 .../org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e6f954a5/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
index 1d03a5b..4ab0c16 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
@@ -71,8 +71,10 @@ private[shared] object SharedParamsCodeGen {
       ParamDesc[Double]("elasticNetParam", "the ElasticNet mixing parameter, in range [0,
1]." +
         " For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty",
         isValid = "ParamValidators.inRange(0, 1)"),
-      ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms"),
-      ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization"),
+      ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms (>=
0)",
+        isValid = "ParamValidators.gtEq(0)"),
+      ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization
(>" +
+        " 0)", isValid = "ParamValidators.gt(0)"),
       ParamDesc[String]("weightCol", "weight column name. If this is not set or empty, we
treat " +
         "all instance weights as 1.0"),
       ParamDesc[String]("solver", "the solver algorithm for optimization. If this is not
set or " +


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message