diff options
author | Zheng RuiFeng <ruifengz@foxmail.com> | 2016-05-13 08:52:06 +0200 |
---|---|---|
committer | Nick Pentreath <nick.pentreath@gmail.com> | 2016-05-13 08:52:06 +0200 |
commit | 87d69a01f027aa18718827f94f921b4a1eaa78a5 (patch) | |
tree | 7599c56c9a770f661cc3195f6bb317a308889fc8 /python/pyspark/ml/param/shared.py | |
parent | d1aadea05ab1c7350e46479cc68d08e11916a751 (diff) | |
download | spark-87d69a01f027aa18718827f94f921b4a1eaa78a5.tar.gz spark-87d69a01f027aa18718827f94f921b4a1eaa78a5.tar.bz2 spark-87d69a01f027aa18718827f94f921b4a1eaa78a5.zip |
[MINOR][PYSPARK] update _shared_params_code_gen.py
## What changes were proposed in this pull request?
1, add arg-checkings for `tol` and `stepSize` to keep in line with `SharedParamsCodeGen.scala`
2, fix one typo
## How was this patch tested?
local build
Author: Zheng RuiFeng <ruifengz@foxmail.com>
Closes #12996 from zhengruifeng/py_args_checking.
Diffstat (limited to 'python/pyspark/ml/param/shared.py')
-rw-r--r-- | python/pyspark/ml/param/shared.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/pyspark/ml/param/shared.py b/python/pyspark/ml/param/shared.py index 9ed63e48ae..c5ccf81540 100644 --- a/python/pyspark/ml/param/shared.py +++ b/python/pyspark/ml/param/shared.py @@ -328,10 +328,10 @@ class HasSeed(Params): class HasTol(Params): """ - Mixin for param tol: the convergence tolerance for iterative algorithms. + Mixin for param tol: the convergence tolerance for iterative algorithms (>= 0). """ - tol = Param(Params._dummy(), "tol", "the convergence tolerance for iterative algorithms.", typeConverter=TypeConverters.toFloat) + tol = Param(Params._dummy(), "tol", "the convergence tolerance for iterative algorithms (>= 0).", typeConverter=TypeConverters.toFloat) def __init__(self): super(HasTol, self).__init__() @@ -351,10 +351,10 @@ class HasTol(Params): class HasStepSize(Params): """ - Mixin for param stepSize: Step size to be used for each iteration of optimization. + Mixin for param stepSize: Step size to be used for each iteration of optimization (>= 0). """ - stepSize = Param(Params._dummy(), "stepSize", "Step size to be used for each iteration of optimization.", typeConverter=TypeConverters.toFloat) + stepSize = Param(Params._dummy(), "stepSize", "Step size to be used for each iteration of optimization (>= 0).", typeConverter=TypeConverters.toFloat) def __init__(self): super(HasStepSize, self).__init__() @@ -374,10 +374,10 @@ class HasStepSize(Params): class HasHandleInvalid(Params): """ - Mixin for param handleInvalid: how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later. + Mixin for param handleInvalid: how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an error). More options may be added later. """ - handleInvalid = Param(Params._dummy(), "handleInvalid", "how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later.", typeConverter=TypeConverters.toString) + handleInvalid = Param(Params._dummy(), "handleInvalid", "how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an error). More options may be added later.", typeConverter=TypeConverters.toString) def __init__(self): super(HasHandleInvalid, self).__init__() |