FriesischScott / UncertaintyQuantification.jl

Uncertainty Quantification in Julia
MIT License
28 stars 7 forks source link

Add Design of Experiments #93

Closed mlsuh closed 1 year ago

mlsuh commented 1 year ago

Adds a number of design of experiments to use with the ResponseSurface.

The documentation and demo files include an example where the Himmelblau function is approximated.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 98.02% and project coverage change: -0.15 :warning:

Comparison is base (d603f94) 98.83% compared to head (84ae7df) 98.68%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #93 +/- ## ========================================== - Coverage 98.83% 98.68% -0.15% ========================================== Files 22 23 +1 Lines 684 835 +151 ========================================== + Hits 676 824 +148 - Misses 8 11 +3 ``` | [Impacted Files](https://app.codecov.io/gh/FriesischScott/UncertaintyQuantification.jl/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jasper+Behrensdorf) | Coverage Δ | | |---|---|---| | [src/UncertaintyQuantification.jl](https://app.codecov.io/gh/FriesischScott/UncertaintyQuantification.jl/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jasper+Behrensdorf#diff-c3JjL1VuY2VydGFpbnR5UXVhbnRpZmljYXRpb24uamw=) | `100.00% <ø> (ø)` | | | [src/simulations/doe.jl](https://app.codecov.io/gh/FriesischScott/UncertaintyQuantification.jl/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jasper+Behrensdorf#diff-c3JjL3NpbXVsYXRpb25zL2RvZS5qbA==) | `98.01% <98.01%> (ø)` | | | [src/models/responsesurface.jl](https://app.codecov.io/gh/FriesischScott/UncertaintyQuantification.jl/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jasper+Behrensdorf#diff-c3JjL21vZGVscy9yZXNwb25zZXN1cmZhY2Uuamw=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

FriesischScott commented 1 year ago

Please move the doe.jl into the simulations subfolder.

mlsuh commented 1 year ago

FractionalFactorial and BoxBehnken are now implemented. Can be tested by (un)commenting and manipulating the respective lines of code in ...demo/metamodels/responsesurface.jl

FriesischScott commented 1 year ago

It turns out the mapping through standard normal space etc. is not the way to go. With the design of experiments we just want to cover the input space and don't care about the exact distributions. So we are going to do the following:

For finite bounds we just scale and shift the values between the bounds of the distribution. For example, for a Uniform(-1, 1) the values [0.0, 0.5, 1.0] would become[-1, 0.0, 1.0]. For infinite bounds we add another property to all the designs σ::Integer=1. In the transformation we will use + or - σ times the standard deviation of the rv as the bounds.

This way, no mappings through the cdf are performed and there is no risk of inf or nan values.

@mlsuh Can you adapt the sample function to behave like this?

FriesischScott commented 1 year ago

Nice work @mlsuh!