GitHub user wangmiao1981 opened a pull request: https://github.com/apache/spark/pull/12969
[SPARK-15096][ML]:LogisticRegression MultiClassSummarizer numClasses can fail if no valid labels are found ## What changes were proposed in this pull request? (Please fill in changes proposed in this fix) Throw better exception when numClasses is empty and empty.max is thrown. ## How was this patch tested? (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests) Add a new unit test, which calls histogram with empty numClasses. You can merge this pull request into a Git repository by running: $ git pull https://github.com/wangmiao1981/spark logisticR Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/12969.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 #12969 ---- commit cfcb4b2fb72fda66784a111235f9fac611a9926f Author: wm...@hotmail.com <wm...@hotmail.com> Date: 2016-05-07T00:05:35Z add exception to LogisticRegression MultiClassSummarizer numClasses ---- --- 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