Skip to content

Rework ProbabilityBox and Interval #248

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

FriesischScott
Copy link
Owner

@FriesischScott FriesischScott commented May 28, 2025

This PR introduces two main changes:

  1. The ProbabilityBox is now without name and has to be wrapped inside a RandomVariable (now a parametric type)
  • Additionally, a pbox is now constructed using a Dictionary mapping the parameters of the distribution to either a Real or a Interval
  • I think this is a lot cleaner than before and also easier to handle in the code.
  1. The Interval type is now mainly used internally for the propagation of epistemic uncertainties and to construct p-boxes
  • A new IntervalVariable is introduced to be used as inputs

This gives us more flexibility and allows us to use intervals and pboxes inside other structs in downstream packages.

As an added benefit this gives us dependent pboxes.

I've also added documentation on imprecise reliability analysis.

Closes #196

@FriesischScott FriesischScott added the enhancement Improvement of existing code label May 28, 2025
@FriesischScott FriesischScott requested a review from AnderGray May 28, 2025 09:28
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 90.99099% with 10 lines in your changes missing coverage. Please review.

Project coverage is 94.21%. Comparing base (f5ee6cc) to head (ec89af8).

Files with missing lines Patch % Lines
src/inputs/imprecise/p-box.jl 84.84% 5 Missing ⚠️
src/inputs/imprecise/interval.jl 88.46% 3 Missing ⚠️
src/inputs/jointdistribution.jl 85.71% 1 Missing ⚠️
src/reliability/probabilityoffailure_imprecise.jl 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage   94.30%   94.21%   -0.09%     
==========================================
  Files          42       43       +1     
  Lines        1772     1799      +27     
==========================================
+ Hits         1671     1695      +24     
- Misses        101      104       +3     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P-box and imprecise docs
1 participant