GitHub user VinceShieh opened a pull request:
https://github.com/apache/spark/pull/14747
[SPARK-17086] Fix an issue in QuantileDiscretizer
## What changes were proposed in this pull request?
In cases when QuantileDiscretizerSuite is called upon a numeric array with
duplicated elements, we will take the unique elements generated from
approxQuantiles as input for Bucketizer.
## How was this patch tested?
An unit test is added in QuantileDiscretizerSuite
QuantileDiscretizer.fit will throw an illegal exception when calling
setSplits on a list of splits
with duplicated elements. Bucketizer.setSplits should only accept either a
numeric vector of two
or more unique cut points, although that may produce less number of buckets
than requested.
Signed-off-by: VinceShieh <[email protected]>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/VinceShieh/spark SPARK-17086
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14747.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14747
----
commit 4467bb6be25b7cbd5b29b011f09b43da12a643c3
Author: VinceShieh <[email protected]>
Date: 2016-08-20T02:06:22Z
Fix an issue in QuantileDiscretizer
QuantileDiscretizer.fit will throw an illegal exception when calling
setSplits on a list of splits
with duplicated elements. Bucketizer.setSplits should only accept either a
numeric vector of two
or more unique cut points, although that may produce less number of buckets
than requested.
Signed-off-by: VinceShieh <[email protected]>
----
---
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]