-
Notifications
You must be signed in to change notification settings - Fork 196
Naive approach for IID potential evaluation for score estimators #1508
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1508 +/- ##
==========================================
- Coverage 86.70% 83.73% -2.98%
==========================================
Files 134 134
Lines 11151 11168 +17
==========================================
- Hits 9669 9352 -317
- Misses 1482 1816 +334
Flags with carried forward coverage won't be shown. Click here to find out more.
|
e16d436
to
e5c8480
Compare
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.
Thanks for implementing looks great.
Just a few changes i.e. moving the tests and using corresponding pytest
fixture needs to be done.
…r_gaussian_mvn_prior in tests
e5c8480
to
f0da7e2
Compare
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.
Thanks, great effort. Looks good.
This is done, but I will block merging this for now as it will have conflicts with #1497.
Alright this can finally be merged. Will update based on the current main and then see if everything still works. |
Multiline string Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR implements IID (Independent and Identically Distributed) potential evaluation for score estimators, addressing issue #1450. The implementation uses Effective Sample Score (ESS) to evaluate log_probs for both single observations and IID observations cases.
Key Changes
- Added IID support to vector field potential evaluation by implementing multiple flows for batch processing
- Introduced log probability computation for IID observations with proper mathematical adjustments
- Added comprehensive test coverage for IID functionality with parameterized batch sizes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
sbi/inference/potentials/vector_field_potential.py | Implements IID potential evaluation with flow rebuilding and log probability computation |
sbi/inference/posteriors/vector_field_posterior.py | Updates log_prob method to detect and handle IID observations |
tests/linearGaussian_vector_field_test.py | Adds parameterized test for IID log probability computation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Addresses the issue #1450
Used Effective Sample Score (ESS) to evaluate the log_probs returned by estimated posterior. This way log_probs are being checked both for single observation and iid observations case through the test added via the parameter -
iid_batch_size