UncertaintyQuantification.jl icon indicating copy to clipboard operation
UncertaintyQuantification.jl copied to clipboard

Rework ProbabilityBox and Interval

Open FriesischScott opened this issue 7 months ago • 1 comments

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 avatar May 28 '25 09:05 FriesischScott

Codecov Report

:x: Patch coverage is 96.21212% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 94.45%. Comparing base (af39f5d) to head (9038054). :warning: Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/inputs/imprecise/interval.jl 92.59% 2 Missing :warning:
src/inputs/imprecise/p-box.jl 97.77% 1 Missing :warning:
src/inputs/jointdistribution.jl 85.71% 1 Missing :warning:
src/reliability/probabilityoffailure_imprecise.jl 94.11% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   94.19%   94.45%   +0.25%     
==========================================
  Files          42       43       +1     
  Lines        1808     1856      +48     
==========================================
+ Hits         1703     1753      +50     
+ Misses        105      103       -2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar May 28 '25 09:05 codecov[bot]

Very nice to have dependent p-boxes working!

Overall I think it's nice. I do find it slightly confusing that we now need to wrap the p-box type in a RandomVariable. Also at some point people will probably be confused by the distinction between Interval and IntervalVariable.

But I guess the distinction is required for other codes to use this features?

Yes this allows not only other but also us to use p-boxes and intervals internally where we might not necessarily have an associated Symbol.

I'll work on the documentation to make the distinction clear to the user.

FriesischScott avatar Aug 05 '25 15:08 FriesischScott