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

Improve Numerical Stability #167

Merged
merged 3 commits into from
Sep 7, 2024
Merged

Improve Numerical Stability #167

merged 3 commits into from
Sep 7, 2024

Conversation

kmdalton
Copy link
Member

@kmdalton kmdalton commented Sep 7, 2024

Several users have been reporting numerical issues with careless. Recently, I was able to reproduce them, and I tracked the issue down to an overflow in the scale parameter of the normal distribution which parameterizes the reflection scales. The default bijector here has been the exponential for sometime. However, apparently it does not work stably for some data sets (probably those with particularly bright reflections). One solution would be to normalize the intensities in the likelihood calculation. This might be worth exploring in the future. For now, I have changed the default bijector back to softplus and added a command line flag --scale-bijector={exp,softplus}.

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.80%. Comparing base (0d5e4a4) to head (9ea412a).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
careless/io/manager.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   78.69%   80.80%   +2.10%     
==========================================
  Files          52       52              
  Lines        2347     2386      +39     
==========================================
+ Hits         1847     1928      +81     
+ Misses        500      458      -42     
Flag Coverage Δ
unittests 80.80% <91.66%> (+2.10%) ⬆️

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

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

@kmdalton kmdalton merged commit 62c6859 into main Sep 7, 2024
3 checks passed
@kmdalton kmdalton deleted the numerics branch September 7, 2024 17:20
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