Skip to content

Conversation

@comane
Copy link
Member

@comane comane commented Nov 11, 2024

New module for Bayesian model averaging

New Features:

  • Added a new module colibri.model_average for performing Bayesian model averaging, including functions for selecting fits and computing weights (colibri/model_average.py).

Enhancements:

  • Introduced a new dataclass ColibriFitSpec to encapsulate fit specifications and Bayesian metrics (colibri/core.py).
  • Added a new method parse_fits in colibri/config.py to parse a list of fits into ColibriFitSpec objects (colibri/config.py).

Refactoring:

  • Refactored the ns_resampler script to use new utility functions ns_fit_resampler and write_resampled_ns_fit for improved clarity and reusability (colibri/scripts/ns_resampler.py). [1] [2]
  • Updated colibri/utils.py with new utility functions for resampling and writing resampled fits, and included necessary imports (colibri/utils.py). [1] [2] [3]

Miscellaneous:

  • Added pandas and new imports to colibri/config.py to support the new functionalities (colibri/config.py).
  • Included the new module colibri.model_average in the colibri/app.py module list (colibri/app.py).

@comane comane force-pushed the bayesian_model_average branch from 9e99ce6 to 6ba9e73 Compare November 12, 2024 12:31
@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

❌ Patch coverage is 46.80851% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.85%. Comparing base (19975dd) to head (b47f690).

Files with missing lines Patch % Lines
colibri/utils.py 5.76% 49 Missing ⚠️
colibri/model_average.py 96.29% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (46.80%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
- Coverage   95.01%   91.85%   -3.16%     
==========================================
  Files          29       30       +1     
  Lines        1344     1437      +93     
==========================================
+ Hits         1277     1320      +43     
- Misses         67      117      +50     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@comane
Copy link
Member Author

comane commented Nov 16, 2024

  • add example runcard
  • Allow to specify that the fit is composed out of two: analytic and numeric -> allows for taking the correct evidence.

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.

3 participants