Skip to content

adds beta-binomial mean and test cases #5175

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

Merged
merged 3 commits into from
Nov 13, 2021

Conversation

morganstrom
Copy link
Contributor

Note that the get_moment method returns an integer value (rounding the mean down to the nearest integer) in this implementation. Probably due to multiplying an integer with floats..

This is made clear in two of the test cases, where np.floor is applied to the expected output. This is similar to the implementation of the Binomial mean (also a integer multiplied with a float, and where the test cases are also rounded to integer values) so I figured it would be OK. Let me know otherwise!

Thank your for opening a PR!

Depending on what your PR does, here are a few things you might want to address in the description:

@codecov
Copy link

codecov bot commented Nov 11, 2021

Codecov Report

Merging #5175 (2d8bf02) into main (8d1708a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5175   +/-   ##
=======================================
  Coverage   78.05%   78.05%           
=======================================
  Files          88       88           
  Lines       14146    14151    +5     
=======================================
+ Hits        11042    11046    +4     
- Misses       3104     3105    +1     
Impacted Files Coverage Δ
pymc/distributions/discrete.py 98.30% <100.00%> (+0.02%) ⬆️
pymc/data.py 79.55% <0.00%> (-0.45%) ⬇️

@ricardoV94 ricardoV94 mentioned this pull request Nov 12, 2021
51 tasks
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

Thanks for opening the PR. I have a question below

…thod returns an integer value (rounding the mean down to the nearest integer) in this implementation
@ricardoV94
Copy link
Member

ricardoV94 commented Nov 13, 2021

Seems like you picked some of the main commits by accident during your merge. Can you try to rebase to fix it?

@morganstrom morganstrom force-pushed the beta-binomial-moments branch from b5ee33d to 2d8bf02 Compare November 13, 2021 09:01
@morganstrom
Copy link
Contributor Author

I don't know how that happened but I think I fixed it now!

@ricardoV94
Copy link
Member

Waiting to see if tests pass

@ricardoV94 ricardoV94 merged commit 7485ccc into pymc-devs:main Nov 13, 2021
@morganstrom morganstrom deleted the beta-binomial-moments branch November 14, 2021 14:38
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