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

importance sampling posterior #1183

Merged
merged 3 commits into from
Jun 21, 2024
Merged

Conversation

manuelgloeckler
Copy link
Contributor

@manuelgloeckler manuelgloeckler commented Jun 20, 2024

What does this implement/fix? Explain your changes

Adds the possibility of importance sampling.

Does this close any currently open issues?

Fixes #919

Any other comments?

  • Need to add tests somewhere.

@manuelgloeckler manuelgloeckler linked an issue Jun 20, 2024 that may be closed by this pull request
3 tasks
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.30%. Comparing base (07e3995) to head (172d010).

❗ There is a different number of reports uploaded between BASE (07e3995) and HEAD (172d010). Click for more details.

HEAD has 1 upload more than BASE | Flag | BASE (07e3995) | HEAD (172d010) | |------|------|------| |unittests|1|2|
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1183      +/-   ##
==========================================
- Coverage   81.76%   73.30%   -8.47%     
==========================================
  Files          93       93              
  Lines        7448     7458      +10     
==========================================
- Hits         6090     5467     -623     
- Misses       1358     1991     +633     
Flag Coverage Δ
unittests 73.30% <100.00%> (-8.47%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
sbi/inference/posteriors/importance_posterior.py 86.15% <100.00%> (+31.46%) ⬆️
sbi/inference/snle/snle_base.py 93.81% <100.00%> (+0.19%) ⬆️
sbi/inference/snpe/snpe_base.py 90.96% <100.00%> (+2.00%) ⬆️
sbi/inference/snre/snre_base.py 94.44% <100.00%> (+0.15%) ⬆️

... and 23 files with indirect coverage changes

@manuelgloeckler manuelgloeckler requested a review from gmoss13 June 20, 2024 17:12
Copy link
Contributor

@gmoss13 gmoss13 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, thanks @manuelgloeckler! Make sure to fix the pyright error, I've marked what I think is causing it.

@manuelgloeckler
Copy link
Contributor Author

Great, thanks for the pyright fix. Your suggestions resolved it.

@manuelgloeckler manuelgloeckler merged commit 6f61662 into main Jun 21, 2024
6 checks passed
@janfb janfb deleted the 919-snrle_importance_posterior branch February 17, 2025 12:52
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.

SNLE and SNRE do not support Importance Sampling in build_posterior
2 participants