You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wayne Zhang (JIRA)" <ji...@apache.org> on 2016/10/28 22:01:58 UTC

[jira] [Created] (SPARK-18166) GeneralizedLinearRegression Wrong Value Range for Poisson Distribution

Wayne Zhang created SPARK-18166:
-----------------------------------

             Summary: GeneralizedLinearRegression Wrong Value Range for Poisson Distribution  
                 Key: SPARK-18166
                 URL: https://issues.apache.org/jira/browse/SPARK-18166
             Project: Spark
          Issue Type: Bug
          Components: ML
    Affects Versions: 2.0.0
            Reporter: Wayne Zhang


The current implementation of Poisson GLM seems to allow only positive values (See below). This is not correct since the support of Poisson includes the origin. 

    override def initialize(y: Double, weight: Double): Double = {
      require(y {color:red} > {color} 0.0, "The response variable of Poisson family " +
        s"should be positive, but got $y")
      y
    }

The fix is easy, just change it to 
 require(y {color:red} >= {color} 0.0, "The response variable of Poisson family " +



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org