from optimeo.doe import *
import plotly.io as pio
= "notebook"
pio.renderers.default
= [
parameters 'name': 'Temperature', 'type': 'integer', 'values': [0, 50]},
{'name': 'Pressure', 'type': 'float', 'values': [0, 50]},
{'name': 'Catalyst', 'type': 'categorical', 'values': ['A', 'B', 'C']}
{
]= DesignOfExperiments(
doe # one of the following:
# 'Full Factorial', 'Sobol sequence', 'Fractional Factorial',
# 'Definitive Screening Design', 'Space Filling Latin Hypercube',
# 'Randomized Latin Hypercube', 'Optimal', 'Plackett-Burman', 'Box-Behnken'
type='Sobol sequence',
=parameters,
parameters=20,
Nexp# 'Sobol sequence' supports **linear** constraints on the parameters
# meaning that "Temperature**2 + Pressure**2 <= 250" won't work
=["Temperature + 2*Pressure <= 250"]
feature_constraints )
Design of Experiment using OPTIMEO
Let’s create a parameters list, with their names, values and types
Show a resume of the class:
doe
- Design of Experiments type: Sobol sequence
- Parameters:
{'name': 'Temperature', 'type': 'integer', 'values': [0, 50]}
{'name': 'Pressure', 'type': 'float', 'values': [0, 50]}
{'name': 'Catalyst', 'type': 'categorical', 'values': ['A', 'B', 'C'], 'encoder': None}
- Lows: {'Temperature': np.int64(0), 'Pressure': np.int64(0)}
- Highs: {'Temperature': np.int64(50), 'Pressure': np.int64(50)}
- If applicable:
- Randomize: True
- Number of Experiments: 20
- Order: 2
- Reduction: 2
- Design:
run_order Temperature Pressure Catalyst
0 2 6 35.531425 B
1 18 27 21.355860 C
2 15 48 49.591119 A
3 9 19 7.290747 A
4 16 17 41.096456 A
5 20 41 2.116205 C
6 12 35 30.159282 C
7 10 7 13.054220 B
8 3 12 44.009413 B
9 8 33 11.309977 A
10 17 42 33.074693 B
11 19 13 22.250067 C
12 7 23 26.335362 C
13 5 47 18.440615 B
14 4 29 40.397563 A
15 6 1 4.377622 C
16 13 1 38.972786 A
17 1 31 6.096160 B
18 14 45 28.034797 A
19 11 23 17.033357 B
Just the design:
doe.design
run_order | Temperature | Pressure | Catalyst | |
---|---|---|---|---|
0 | 2 | 6 | 35.531425 | B |
1 | 18 | 27 | 21.355860 | C |
2 | 15 | 48 | 49.591119 | A |
3 | 9 | 19 | 7.290747 | A |
4 | 16 | 17 | 41.096456 | A |
5 | 20 | 41 | 2.116205 | C |
6 | 12 | 35 | 30.159282 | C |
7 | 10 | 7 | 13.054220 | B |
8 | 3 | 12 | 44.009413 | B |
9 | 8 | 33 | 11.309977 | A |
10 | 17 | 42 | 33.074693 | B |
11 | 19 | 13 | 22.250067 | C |
12 | 7 | 23 | 26.335362 | C |
13 | 5 | 47 | 18.440615 | B |
14 | 4 | 29 | 40.397563 | A |
15 | 6 | 1 | 4.377622 | C |
16 | 13 | 1 | 38.972786 | A |
17 | 1 | 31 | 6.096160 | B |
18 | 14 | 45 | 28.034797 | A |
19 | 11 | 23 | 17.033357 | B |
Make a plot of the design:
= doe.plot()
figs for fig in figs:
fig.show()