[ 
https://issues.apache.org/jira/browse/SPARK-18166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15619152#comment-15619152
 ] 

Apache Spark commented on SPARK-18166:
--------------------------------------

User 'actuaryzhang' has created a pull request for this issue:
https://github.com/apache/spark/pull/15683

> 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
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to