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

Teng Peng commented on SPARK-24024:
-----------------------------------

I will first reproduce the issue he has, check how does R handle this, and if 
we have any other fix needed.

> Fix deviance calculations in GLM to handle corner cases
> -------------------------------------------------------
>
>                 Key: SPARK-24024
>                 URL: https://issues.apache.org/jira/browse/SPARK-24024
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 2.3.0
>            Reporter: Teng Peng
>            Priority: Minor
>
> It is reported by Spark users that the deviance calculations does not handle 
> a corner case. Thus, the correct model summary cannot be obtained. The user 
> has confirmed the the issue is in
> override def deviance(y: Double, mu: Double, weight: Double): Double = {
>  2.0 * weight * (y * math.log(y / mu) - (y - mu))
>  }
> when y = 0.
>  
> The user also mentioned there are many other places he believe we should 
> check the same thing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to