GitHub user actuaryzhang opened a pull request: https://github.com/apache/spark/pull/16131
[SPARK-18701][ML] Poisson GLM fails due to wrong initialization Poisson GLM fails for many standard data sets (see example in test or JIRA). The issue is incorrect initialization leading to almost zero probability and weights. Specifically, the mean is initialized as the response, which could be zero. Applying the log link results in very negative numbers (protected against -Inf), which again leads to close to zero probability and weights in the weighted least squares. Fix and test are included in the commits. ## What changes were proposed in this pull request? Update initialization in Poisson GLM ## How was this patch tested? Add test in GeneralizedLinearRegressionSuite You can merge this pull request into a Git repository by running: $ git pull https://github.com/actuaryzhang/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16131.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 #16131 ---- commit 784cb09343bb1bae50c23dd943acf11a4baded03 Author: actuaryzhang <actuaryzhan...@gmail.com> Date: 2016-12-04T00:41:29Z Change initial value in Poisson GLM to avoid numerical issue commit 56c4779a5e0f7de902aa22c943192500b6c85c37 Author: actuaryzhang <actuaryzhan...@gmail.com> Date: 2016-12-04T03:06:53Z Update Poisson GLM test (for incorrect initialization) ---- --- 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