[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 <krishnakalyan3@gmail.com>

Closes #16242 from krishnakalyan3/doc-string.
This commit is contained in:
krishnakalyan3 2016-12-11 09:28:16 +00:00 committed by Sean Owen
parent f60ffe7412
commit c802ad8718
No known key found for this signature in database
GPG key ID: BEB3956D6717BDDC
3 changed files with 8 additions and 8 deletions

View file

@ -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
*/

View file

@ -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
*/

View file

@ -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)