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

    https://github.com/apache/spark/pull/15817#discussion_r87593705
  
    --- Diff: python/pyspark/ml/feature.py ---
    @@ -1194,21 +1217,30 @@ class QuantileDiscretizer(JavaEstimator, 
HasInputCol, HasOutputCol, JavaMLReadab
                               "Must be in the range [0, 1].",
                               typeConverter=TypeConverters.toFloat)
     
    +    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 " +
    +                          "additional bucket).",
    +                          typeConverter=TypeConverters.toString)
    +
         @keyword_only
    -    def __init__(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001):
    +    def __init__(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001,
    +                 handleInvalid="error"):
             """
    -        __init__(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001)
    +        __init__(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001,
    +        handleInvalid="error")
             """
             super(QuantileDiscretizer, self).__init__()
             self._java_obj = 
self._new_java_obj("org.apache.spark.ml.feature.QuantileDiscretizer",
                                                 self.uid)
    -        self._setDefault(numBuckets=2, relativeError=0.001)
    +        self._setDefault(numBuckets=2, relativeError=0.001, 
handleInvalid="error")
             kwargs = self.__init__._input_kwargs
             self.setParams(**kwargs)
     
         @keyword_only
         @since("2.0.0")
    -    def setParams(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001):
    +    def setParams(self, numBuckets=2, inputCol=None, outputCol=None, 
relativeError=0.001,
    +                  handleInvalid="error"):
    --- End diff --
    
    fixed


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to