GitHub user mengxr opened a pull request:
https://github.com/apache/spark/pull/6075
[SPARK-7559][MLLIB] Bucketizer should include the right most boundary in
the last bucket.
We make special treatment for +inf in `Bucketizer`. This could be
simplified by always including the largest split value in the last bucket.
E.g., (x1, x2, x3) defines buckets [x1, x2) and [x2, x3]. This shouldn't affect
user code much, and there are applications that need to include the right-most
value. For example, we can bucketize ratings from 0 to 10 to bad, neutral, and
good with splits 0, 4, 6, 10. It may reads weird if the users need to put 0, 4,
6, 10.1 (or 11).
This also update the impl to use `Arrays.binarySearch` and `withClue` in
test.
@yinxusen @jkbradley
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mengxr/spark SPARK-7559
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/6075.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 #6075
----
commit e28f9101da79c2c9b26698714b2858c721c68f5e
Author: Xiangrui Meng <[email protected]>
Date: 2015-05-12T07:34:42Z
update bucketizer impl
----
---
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]