Deterministic design of experiments

In this example we present the available deterministic design of experiments.

Four types of deterministic design of experiments are available:

  • Axial

  • Factorial

  • Composite

  • Box

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 (0,1)^d and can be scaled and moved to cover the desired box.

[1]:
from __future__ import print_function
import openturns as ot

We will use the following function to plot bi-dimensional samples.

[2]:
def drawBidimensionalSample(sample, title):
    n = sample.getSize()
    graph = ot.Graph("%s, size=%d" % (title, n), "X1", "X2", True, '')
    cloud = ot.Cloud(sample)
    graph.add(cloud)
    return graph

Axial design

[3]:
levels = [1.0, 1.5, 3.0]
experiment = ot.Axial(2, levels)
sample = experiment.generate()
drawBidimensionalSample(sample,"Axial")
[3]:
../../_images/examples_reliability_sensitivity_deterministic_design_6_0.png

Scale and to get desired location.

[4]:
sample *= 2.0
sample += [5.0, 8.0]
drawBidimensionalSample(sample,"Axial")
[4]:
../../_images/examples_reliability_sensitivity_deterministic_design_8_0.png

Factorial design

[5]:
experiment = ot.Factorial(2, levels)
sample = experiment.generate()
sample *= 2.0
sample += [5.0, 8.0]
drawBidimensionalSample(sample,"Factorial")
[5]:
../../_images/examples_reliability_sensitivity_deterministic_design_10_0.png

Composite design

[6]:
experiment = ot.Composite(2, levels)
sample = experiment.generate()
sample *= 2.0
sample += [5.0, 8.0]
drawBidimensionalSample(sample,"Composite")
[6]:
../../_images/examples_reliability_sensitivity_deterministic_design_12_0.png

Grid design

[7]:
levels = [3, 4]
experiment = ot.Box(levels)
sample = experiment.generate()
sample *= 2.0
sample += [5.0, 8.0]
drawBidimensionalSample(sample,"Box")
[7]:
../../_images/examples_reliability_sensitivity_deterministic_design_14_0.png