Skip to content

Conversation

anastasiakrouglova
Copy link
Collaborator

@anastasiakrouglova anastasiakrouglova commented Mar 18, 2025

I changed the way we are z_scoring the data. Now, instead of
none, independent and structured, we have can also logit transform our input, to train in an unbound space:

    - `independent`: Applies standard z-scoring with independent dimensions.
    - `structured`: Applies standard z-scoring with structured dimensions.
    - `logit`: Applies logit transformation, the user has to specify the distribution (prior for NPE and some distribution over data if this wants to be used for NLE)
    - `none`: No transformation

This implementation also allows logit-transforming the samples for numerically stable training when many samples are outside the prior bounds.

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

❌ Patch coverage is 96.36364% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.54%. Comparing base (65ae720) to head (1ee797d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sbi/neural_nets/net_builders/flow.py 97.72% 1 Missing ⚠️
sbi/utils/sbiutils.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1485      +/-   ##
==========================================
- Coverage   86.43%   82.54%   -3.90%     
==========================================
  Files         135      135              
  Lines       10927    10931       +4     
==========================================
- Hits         9445     9023     -422     
- Misses       1482     1908     +426     
Flag Coverage Δ
unittests 82.54% <96.36%> (-3.90%) ⬇️

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

Files with missing lines Coverage Δ
sbi/neural_nets/net_builders/flow.py 97.57% <97.72%> (+6.57%) ⬆️
sbi/utils/sbiutils.py 79.15% <90.90%> (-7.71%) ⬇️

... and 26 files with indirect coverage changes

@janfb janfb linked an issue Mar 20, 2025 that may be closed by this pull request
@janfb
Copy link
Contributor

janfb commented Jul 17, 2025

@anastasiakrouglova thanks for the updates! 🙏

is this ready for another round of reviews?

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Thanks a lot @anastasiakrouglova ! 🙏
I added a couple of comments and suggestions, but we are very close :)

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.

I don't have anything to add - once the comments from @janfb are resolved we can merge!

@janfb janfb merged commit ebcd68e into sbi-dev:main Jul 31, 2025
9 checks passed
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.

Flow training in unconstrained space
3 participants