Repository: spark
Updated Branches:
  refs/heads/branch-2.1 d4c03f876 -> d5f14168d


[SPARK-18628][ML] Update Scala param and Python param to have quotes

## What changes were proposed in this pull request?

Updated Scala param and Python param to have quotes around the options making 
it easier for users to read.

## How was this patch tested?

Manually checked the docstrings

Author: krishnakalyan3 <[email protected]>

Closes #16242 from krishnakalyan3/doc-string.

(cherry picked from commit c802ad87182520662be51eb611ea1c64f4874c4e)
Signed-off-by: Sean Owen <[email protected]>


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

Branch: refs/heads/branch-2.1
Commit: d5f14168d39433a02d065206c3910595339ff3dc
Parents: d4c03f8
Author: krishnakalyan3 <[email protected]>
Authored: Sun Dec 11 09:28:16 2016 +0000
Committer: Sean Owen <[email protected]>
Committed: Sun Dec 11 09:28:26 2016 +0000

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/ml/feature/Bucketizer.scala    | 6 +++---
 .../org/apache/spark/ml/feature/QuantileDiscretizer.scala      | 6 +++---
 python/pyspark/ml/feature.py                                   | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d5f14168/mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala 
b/mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
index eb4d42f..d1f3b2a 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
@@ -78,9 +78,9 @@ final class Bucketizer @Since("1.4.0") (@Since("1.4.0") 
override val uid: String
   def setOutputCol(value: String): this.type = set(outputCol, value)
 
   /**
-   * Param for how to handle invalid entries. Options are skip (filter out 
rows with
-   * invalid values), error (throw an error), or keep (keep invalid values in 
a special additional
-   * bucket).
+   * Param for how to handle invalid entries. Options are 'skip' (filter out 
rows with
+   * invalid values), 'error' (throw an error), or 'keep' (keep invalid values 
in a special
+   * additional bucket).
    * Default: "error"
    * @group param
    */

http://git-wip-us.apache.org/repos/asf/spark/blob/d5f14168/mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala
----------------------------------------------------------------------
diff --git 
a/mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala 
b/mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala
index b4fcfa2..80c7f55 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala
@@ -66,9 +66,9 @@ private[feature] trait QuantileDiscretizerBase extends Params
   def getRelativeError: Double = getOrDefault(relativeError)
 
   /**
-   * Param for how to handle invalid entries. Options are skip (filter out 
rows with
-   * invalid values), error (throw an error), or keep (keep invalid values in 
a special additional
-   * bucket).
+   * Param for how to handle invalid entries. Options are 'skip' (filter out 
rows with
+   * invalid values), 'error' (throw an error), or 'keep' (keep invalid values 
in a special
+   * additional bucket).
    * Default: "error"
    * @group param
    */

http://git-wip-us.apache.org/repos/asf/spark/blob/d5f14168/python/pyspark/ml/feature.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/feature.py b/python/pyspark/ml/feature.py
index 1d62b32..62c3143 100755
--- a/python/pyspark/ml/feature.py
+++ b/python/pyspark/ml/feature.py
@@ -165,8 +165,8 @@ class Bucketizer(JavaTransformer, HasInputCol, 
HasOutputCol, JavaMLReadable, Jav
               typeConverter=TypeConverters.toListFloat)
 
     handleInvalid = Param(Params._dummy(), "handleInvalid", "how to handle 
invalid entries. " +
-                          "Options are skip (filter out rows with invalid 
values), " +
-                          "error (throw an error), or keep (keep invalid 
values in a special " +
+                          "Options are 'skip' (filter out rows with invalid 
values), " +
+                          "'error' (throw an error), or 'keep' (keep invalid 
values in a special " +
                           "additional bucket).",
                           typeConverter=TypeConverters.toString)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to