Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in truncated Laplace's logpdf compute #143

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

horizon-blue
Copy link
Contributor

@horizon-blue horizon-blue commented Sep 7, 2024

My bad. I was trying to be smart and switched to use logcdf instead of regular cdf in #142, but I wasn't super careful when I changed the function calls, and ended up changing 1 - cdf(val) -> 1 - log_cdf(val), which means totally different things. This is fixed by calling log_survival_function(val) instead.

I've verified that with this fix, the two failing tests in #142 now successfully runs.

As a side note, it's really great that we have good tests and CI to catch small bugs like this! Otherwise it could've took me ages to figure out why the model isn't working as we expected. :)

@horizon-blue horizon-blue mentioned this pull request Sep 7, 2024
@sritchie sritchie merged commit 9436068 into main Sep 7, 2024
7 checks passed
@sritchie sritchie deleted the xyw/fix-truncated-laplace branch September 7, 2024 04:10
Copy link
Contributor

@sritchie sritchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, so good to see these tests running!

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.

2 participants