You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2019/03/07 01:43:25 UTC
[spark] branch master updated: [MINOR][DOC] Updated PySpark
Binarizer docstring to match Scala's.
This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 340c8b8 [MINOR][DOC] Updated PySpark Binarizer docstring to match Scala's.
340c8b8 is described below
commit 340c8b8387bbaebdd23958c9ee7a352461abc1f8
Author: Brooke Wenig <br...@gmail.com>
AuthorDate: Wed Mar 6 19:42:41 2019 -0600
[MINOR][DOC] Updated PySpark Binarizer docstring to match Scala's.
## What changes were proposed in this pull request?
PySpark's Binarizer docstring had two issues:
1) The values did not need to be in the range [0, 1].
2) It can be used for binary classification prediction.
This change corrects both of these issues by making it consistent with Scala's docstring for Binarizer.
## How was this patch tested?
Not applicable because I only changed the docstring. But if I need to do any testing, let me know and I'll do it.
Please review http://spark.apache.org/contributing.html before opening a pull request.
Closes #23934 from brookewenig/binarizer-docs-fix.
Authored-by: Brooke Wenig <br...@gmail.com>
Signed-off-by: Sean Owen <se...@databricks.com>
---
python/pyspark/ml/feature.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/pyspark/ml/feature.py b/python/pyspark/ml/feature.py
index 8583046..3f9de9c 100755
--- a/python/pyspark/ml/feature.py
+++ b/python/pyspark/ml/feature.py
@@ -86,7 +86,9 @@ class Binarizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, Java
"""
threshold = Param(Params._dummy(), "threshold",
- "threshold in binary classification prediction, in range [0, 1]",
+ "Param for threshold used to binarize continuous features. " +
+ "The features greater than the threshold will be binarized to 1.0. " +
+ "The features equal to or less than the threshold will be binarized to 0.0",
typeConverter=TypeConverters.toFloat)
@keyword_only
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org