Github user yanboliang commented on the issue:
https://github.com/apache/spark/pull/16011
When I did QA work for 2.1, I found the parameter ``` handleInvalid``` is
disorienting. For example, the default behavior of ```QuantileDiscretizer``` to
handle invalid value (i.e. NaN) is throwing error. So users expect errors if
running against the following code.
```
val data = Array(-0.9, -0.5, -0.3, 0.0, 0.2, 0.5, 0.9, Double.NaN,
Double.NaN, Double.NaN)
val df = data.toSeq.toDF("input")
val discretizer = new QuantileDiscretizer()
.setInputCol("input")
.setOutputCol("result")
.setNumBuckets(3)
val model = discretizer.fit(df)
println(model.getSplits.mkString(","))
```
However, the above code can work well w/o any error thrown.
I'm OK with not make this change, but we should clarify it more clear in
document. Thanks.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]