I see, this was handled for binomial deviance by the 'ylogy' method, which computes y log (y / mu), defining this to be 0 when y = 0. It's not necessary to add a delta or anything; 0 is the limit as y goes to 0 so it's fine.

 The same change is appropriate for Poisson deviance. Gamma deviance looks like it also has this issue but I suppose it isn't defined at 0 anyway. I don't know if implementations still try to return something that isn't NaN or what here.

Anyway, I think it's fine to open a JIRA and PR to make that change.

On Wed, Apr 18, 2018 at 9:30 PM svattig <srikar.vattigunta@gmail.com> wrote:
Yes i’m referring to that method deviance. It fails when ever y is 0. I think
R deviance calculation logic checks if y is 0 and assigns 1 to y for such

There are few deviances Like nulldeviance, residualdiviance and deviance
that Glm regression summary object has.
You might want to check those as well so the toString method doesn’t fail.

Thank you,

Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/

To unsubscribe e-mail: dev-unsubscribe@spark.apache.org