Skip to content

Conversation

@cscherrer
Copy link
Contributor

@cscherrer cscherrer commented Apr 21, 2025

This PR introduces two new prior wrapper types to the distribution module:

  • ScaledPrior<Pr, Fx>: A wrapper for priors that scales the output distribution. If drawing a Pr gives a distribution Fx, then drawing ScaledPrior<Pr> will produce a Scaled<Fx>.

  • ShiftedPrior<Pr, Fx>: A wrapper for priors that shifts the output distribution. If drawing a Pr gives a distribution Fx, then drawing ShiftedPrior<Pr> will produce a Shifted<Fx>.

@cscherrer cscherrer changed the title ScaledPrior ScaledPrior and ShiftedPrior Apr 21, 2025
@cscherrer cscherrer marked this pull request as ready for review April 21, 2025 14:22
@codecov
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 83.85269% with 57 lines in your changes missing coverage. Please review.

Project coverage is 80.89%. Comparing base (dbcf0f0) to head (aaca36a).
Report is 1 commits behind head on release/v0.19.0.

Files with missing lines Patch % Lines
src/dist/scaled_prior.rs 78.37% 32 Missing ⚠️
src/dist/shifted_prior.rs 82.26% 25 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           release/v0.19.0      #35      +/-   ##
===================================================
+ Coverage            80.65%   80.89%   +0.23%     
===================================================
  Files                   98      100       +2     
  Lines                20080    20372     +292     
  Branches             20080    20372     +292     
===================================================
+ Hits                 16195    16479     +284     
- Misses                3770     3778       +8     
  Partials               115      115              

☔ 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.

@cscherrer cscherrer marked this pull request as draft April 21, 2025 14:27
@cscherrer cscherrer marked this pull request as ready for review April 22, 2025 14:19
@schmidmt schmidmt force-pushed the feature/scaled-prior branch from 2e76d27 to 143d30f Compare April 22, 2025 15:42
@schmidmt schmidmt force-pushed the feature/scaled-prior branch from 143d30f to 1b9458b Compare April 22, 2025 15:43
Copy link
Contributor

@schmidmt schmidmt left a comment

Choose a reason for hiding this comment

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

Looks great!

@cscherrer cscherrer merged commit 8050df4 into release/v0.19.0 Apr 22, 2025
10 checks passed
@cscherrer cscherrer deleted the feature/scaled-prior branch April 22, 2025 16:32
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