-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Design of Experiments #93
Conversation
reworked responsesurface demo and test unfinished
request review. Added some documentation for responsesurface and polyharmonic spline.
for error if degree is negative
and face centered central composite designs demonstrated in responsesurface demo file.
Codecov ReportPatch coverage:
Additional details and impacted files@@ 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
☔ View full report in Codecov by Sentry. |
Please move the |
FractionalFactorial and BoxBehnken are now implemented. Can be tested by (un)commenting and manipulating the respective lines of code in ...demo/metamodels/responsesurface.jl |
implemented Central Composite(inscribed and face centered)
added tests for Central Composite
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 This way, no mappings through the @mlsuh Can you adapt the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests don't pass.
src/simulations/doe.jl
Outdated
return vcat(two_lvl_points, axial_points) | ||
end | ||
|
||
function doe_samples(_::PlackettBurman, rvs::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't commit work in progress functions.
src/simulations/doe.jl
Outdated
return reduce(vcat, bounds.(jd.marginals, σ)) | ||
end | ||
|
||
function sample(inputs::Array{<:UQInput}, design::AbstractDesignOfExperiments, σ::Int=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sigma should be a parameter of the individual structs of the designs, not the sample function.
src/simulations/doe.jl
Outdated
end | ||
|
||
function bounds(r::RandomVariable, σ::Int) | ||
ub = support(r.dist).ub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ub = maximum(rv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ub = isinf(ub) ? ub : std(rv) * sigma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about ub = isinf(maximum(rv)) ? std(rv) * sigma : maximum(rv)
?
So, one line and no refactoring of ub but with tradeoff of extra call of maximum(rv)
.
src/simulations/doe.jl
Outdated
lb = -std(r.dist) * σ | ||
end | ||
|
||
return [ub lb] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return [lb ub]
Nice work @mlsuh! |
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.