Skip to content

use correct fn for log gamma - #643

Open
luisDVA wants to merge 1 commit into
tidymodels:mainfrom
luisDVA:lgamma-for-poisson-loss
Open

luisDVA wants to merge 1 commit into
tidymodels:mainfrom
luisDVA:lgamma-for-poisson-loss

Conversation

@luisDVA

@luisDVA luisDVA commented Sep 17, 2026

Copy link
Copy Markdown

tidy dev day 2026
replace log(gamma()) with lgamma() to calculate the natural logarithm of the absolute value of the gamma function when caclulating log loss for Poisson data.

fixes #634

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

poisson_log_loss() overflows to Inf for large counts due to log(gamma()) instead of lgamma()

1 participant