-
Notifications
You must be signed in to change notification settings - Fork 894
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 and improve negative binomial distribution #960
base: master
Are you sure you want to change the base?
Commits on Sep 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8a89874 - Browse repository at this point
Copy the full SHA 8a89874View commit details -
Fix sampling from the negative binomial distribution
Fix the rate parameter of the gamma distribution used to represent the negative binomial distribution as Poisson mixture.
Configuration menu - View commit details
-
Copy full SHA for d1fb730 - Browse repository at this point
Copy the full SHA d1fb730View commit details -
Avoid code duplication in sampling from the negative binomial distrib…
…ution Make the unchecked sample methods of the Poisson distribution internal instead of private. Within the negative binomial sampling, call the Poisson sample method instead of duplicating the implementation.
Configuration menu - View commit details
-
Copy full SHA for 8b4cd7a - Browse repository at this point
Copy the full SHA 8b4cd7aView commit details -
Disallow success probability p = 0 for negative binomial distribution
The negative binomial distribution is undefined for p = 0 (asymptotically, it reaches infinity, which cannot be represented as integer). This also avoids unhandled divisions by 0 or other undefined mathematical operations in the properties and an endless loop in the sampling method.
Configuration menu - View commit details
-
Copy full SHA for 6a16def - Browse repository at this point
Copy the full SHA 6a16defView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe863e6 - Browse repository at this point
Copy the full SHA fe863e6View commit details
Commits on Sep 30, 2022
-
Fix the parameter descriptions of the negative binomial distribution
Use correct XML encoding of the less than operator for the description of the range of the p parameter.
Configuration menu - View commit details
-
Copy full SHA for c8cebe2 - Browse repository at this point
Copy the full SHA c8cebe2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bd99d4 - Browse repository at this point
Copy the full SHA 3bd99d4View commit details
Commits on Oct 1, 2022
-
Adjust the unit tests of the negative binomial distribution
Adjust the unit tests after parameter restriction and proper handling of edge cases: - Use p = 0.1 instead of p = 0.0 - Add a test case with p = 0.0 in test for invalid parameters - Add special case in probability validation for p = 1.0 and r = 0.0
Configuration menu - View commit details
-
Copy full SHA for d05fab7 - Browse repository at this point
Copy the full SHA d05fab7View commit details