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

Add negative-binomial conjugate rewrite #105

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

xjing76
Copy link
Contributor

@xjing76 xjing76 commented Feb 15, 2023

This PR will add in NB-beta conjugates along with its tests.

Because the at.random.negative_binomial takes in the number of successes and I switched the the formula for beta and alpha suggested here

This PR is working towards Issue#48

@xjing76
Copy link
Contributor Author

xjing76 commented Feb 15, 2023

I think .github/workflow was not up to date before which was causing the failing of test/py3.10. should be fixed now.

@brandonwillard
Copy link
Member

I think .github/workflow was not up to date before which was causing the failing of test/py3.10. should be fixed now.

Yeah, I think we need #94 to fix that. I'll set up some xfails to get past the current issue in that PR, then we can push its fixes through and keep things moving.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.50%. Comparing base (50b7068) to head (087df87).
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   98.16%   98.50%   +0.34%     
==========================================
  Files          10       10              
  Lines         708      737      +29     
  Branches       63       63              
==========================================
+ Hits          695      726      +31     
+ Misses          5        4       -1     
+ Partials        8        7       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rlouf
Copy link
Member

rlouf commented Feb 16, 2023

I fixed the formatting issues and added a test to make sure the rewrite is picked by construct_sampler.

rlouf
rlouf previously approved these changes Feb 16, 2023
@brandonwillard brandonwillard changed the title Add in NB beta conjugates and its tests Add negative-binomial conjugate rewrite Feb 17, 2023
Copy link
Member

@brandonwillard brandonwillard left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor formatting recommendations. Thanks again, @xjing76!

aemcmc/conjugates.py Outdated Show resolved Hide resolved
aemcmc/conjugates.py Outdated Show resolved Hide resolved
@brandonwillard brandonwillard merged commit 2fc0ee3 into aesara-devs:main Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exact posterior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants