-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add analytical formulas for KL of
Binomial
, NegativeBinomial
, and…
… `Geometric` (#1541) * Put numerical fallback into separate function * Add method for `Binomial` * Add method for `Geometric` * Add method for `NegativeBinomial` * Bump version * Fix type instability Co-authored-by: David Widmann <[email protected]> * Use `invoke` instead of explicit fallback Co-authored-by: David Widmann <[email protected]> * Remove unnecessary fallback Co-authored-by: David Widmann <[email protected]> * Check for equality Co-authored-by: David Widmann <[email protected]> * Update src/univariate/discrete/negativebinomial.jl Co-authored-by: David Widmann <[email protected]> * Add tests for edge cases of `Geometric` * Use numerically stabler computation * Optimize KL for `Binomial`s with different n * Add more tests * Fix edge case * Match return type of `res` * Partially implement suggestion from review * Fix typo * Bump version Co-authored-by: David Widmann <[email protected]> * Update test/ref/readme.md Co-authored-by: David Widmann <[email protected]>
- Loading branch information
Showing
6 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd6ae8f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
dd6ae8f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/59783
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: