GitHub user neggert opened a pull request: https://github.com/apache/spark/pull/14140
[SPARK-16426][MLlib] Fixed bug that caused NaNs in IsotonicRegression ## What changes were proposed in this pull request? Fixed a bug that caused `NaN`s in `IsotonicRegression`. The problem occurs when training rows with the same feature value but different labels end up on different partitions. This patch changes a `sortBy` call to a `partitionBy(RangePartitioner)` followed by a `mapPartitions(sortBy)` in order to ensure that all rows with the same feature value end up on the same partition. ## How was this patch tested? Added a unit test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/neggert/spark SPARK-16426-isotonic-nan Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/14140.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 #14140 ---- commit 3f431164920fb6bd5dc7116748eb178493750136 Author: z001qdp <nicholas.egg...@target.com> Date: 2016-07-11T20:26:17Z Fixed bug that caused NaNs in IsotonicRegression ---- --- 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