Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21125#discussion_r183475337
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala
 ---
    @@ -782,8 +782,12 @@ object GeneralizedLinearRegression extends 
DefaultParamsReadable[GeneralizedLine
     
         override def variance(mu: Double): Double = mu
     
    +    private def ylogy(y: Double, mu: Double): Double = {
    +      if (y == 0) 0.0 else y * math.log(y / mu)
    +    }
    +
    --- End diff --
    
    Any suggestion to avoid the duplicated code? Let's followup this later if 
you have an idea.


---

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

Reply via email to