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

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

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

Sean Owen commented on SPARK-18166:
-----------------------------------

Agree, feel free to open a PR to fix that.

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org