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

use safe negative binomial rng #966

Merged
merged 1 commit into from
Feb 3, 2025
Merged

use safe negative binomial rng #966

merged 1 commit into from
Feb 3, 2025

Conversation

sbfnk
Copy link
Contributor

@sbfnk sbfnk commented Feb 3, 2025

Description

This PR closes #963 by implementing a safe version of the negative binomial 2 rng. Existing code for avoiding numerical issues with this has been moved into the function.

Initial submission checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have tested my changes locally (using devtools::test() and devtools::check()).
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required and rebuilt docs if yes (using devtools::document()).
  • I have followed the established coding standards (and checked using lintr::lint_package()).
  • I have added a news item linked to this PR.

After the initial Pull Request

  • I have reviewed Checks for this PR and addressed any issues as far as I am able.

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Thank you for your contribution sbfnk 🚀! Your synthetic_recovery markdown is ready for download 👉 here 👈!
(The artifact expires on 2025-02-08T10:51:01Z. You can re-generate it by re-running the workflow here.)

Copy link
Contributor

github-actions bot commented Feb 3, 2025

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 3104110 is merged into main:

  • ✔️default: 22.9s -> 22.3s [-12.4%, +7.23%]
  • ✔️no_delays: 23.6s -> 23.6s [-12.32%, +12.62%]
  • ✔️random_walk: 9.46s -> 8.96s [-12.64%, +1.91%]
  • ✔️stationary: 12s -> 12.1s [-13.52%, +14.58%]
  • ✔️uncertain: 50.3s -> 36.2s [-90.08%, +34.19%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@seabbs seabbs added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit 5cefebf Feb 3, 2025
13 checks passed
@seabbs seabbs deleted the safe-negbin branch February 3, 2025 12:37
@sbfnk sbfnk mentioned this pull request Feb 4, 2025
7 tasks
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.

neg_binomial_rng_2 overflow
2 participants