Note
Go to the end to download the full example code.
Create a deterministic design of experiments¶
import openturns as ot
import openturns.viewer as otv
Four types of deterministic designs of experiments are available:
Each type of deterministic design is discretized differently according to a number of levels.
Functionally speaking, a design is a Sample that lies within the unit cube and can be scaled and moved to cover the desired box.
We will use the following function to plot bi-dimensional samples.
Axial design¶
levels = [1.0, 1.5, 3.0]
experiment = ot.Axial(2, levels)
sample = experiment.generate()
graph = drawBidimensionalSample(sample, "Axial")
view = otv.View(graph)
Use *= to rescale and += to move a design. Pay attention to the grid in the next graph.
Factorial design¶
experiment = ot.Factorial(2, levels)
sample = experiment.generate()
sample *= 2.0
sample += [5.0, 8.0]
graph = drawBidimensionalSample(sample, "Factorial")
view = otv.View(graph)
Composite design¶
A composite design is a stratified design of experiments enabling to create a pattern as the union of an Axial pattern and a Factorial one.
The number of points generated is .
experiment = ot.Composite(2, levels)
sample = experiment.generate()
sample *= 2.0
sample += [5.0, 8.0]
graph = drawBidimensionalSample(sample, "Composite")
view = otv.View(graph)
Grid design¶
Display all graphs
OpenTURNS