You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2017/05/15 00:49:00 UTC

[GitHub] spark pull request #17978: [SPARK-20736][Python] PySpark StringIndexer suppo...

Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17978#discussion_r116395876
  
    --- Diff: python/pyspark/ml/feature.py ---
    @@ -2115,22 +2115,32 @@ class StringIndexer(JavaEstimator, HasInputCol, HasOutputCol, HasHandleInvalid,
         .. versionadded:: 1.4.0
         """
     
    +    stringOrderType = Param(Params._dummy(), "stringOrderType",
    +                            "How to order labels of string column. The first label after " +
    +                            "ordering is assigned an index of 0. Supported options: " +
    +                            "frequencyDesc, frequencyAsc, alphabetDsec, alphabetAsc.",
    +                            typeConverter=TypeConverters.toString)
    +
         @keyword_only
    -    def __init__(self, inputCol=None, outputCol=None, handleInvalid="error"):
    +    def __init__(self, inputCol=None, outputCol=None, handleInvalid="error",
    +                 stringOrderType="frequencyDesc"):
             """
    -        __init__(self, inputCol=None, outputCol=None, handleInvalid="error")
    +        __init__(self, inputCol=None, outputCol=None, handleInvalid="error", \
    --- End diff --
    
    Probably, the leading `\` could be removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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