File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 12
12
import openturns .viewer as otv
13
13
import otmorris
14
14
15
+ # %%
15
16
# use the reference 20-d function from the Morris paper
16
17
f = ot .Function (otmorris .MorrisFunction ())
17
18
dim = f .getInputDimension ()
18
19
20
+ # %%
19
21
# Number of trajectories
20
22
r = 10
21
23
24
+ # %%
22
25
# Define experiments in [0,1]^20
23
26
# p-levels
24
27
p = 5
27
30
X = morris_experiment .generate ()
28
31
Y = f (X )
29
32
33
+ # %%
30
34
# Evaluate Elementary effects (ee)
31
35
morris = otmorris .Morris (X , Y , bounds )
32
36
37
+ # %%
33
38
# Compute mu/sigma
34
39
mean = morris .getMeanAbsoluteElementaryEffects ()
35
40
sigma = morris .getStandardDeviationElementaryEffects ()
36
41
graph = morris .drawElementaryEffects (0 )
37
42
view = otv .View (graph )
38
43
44
+ # %%
39
45
otv .View .ShowAll ()
Original file line number Diff line number Diff line change 4
4
"""
5
5
6
6
# %%
7
- # To define the trajectories, we first get an LHS design in the box :math:`[0,1]^{20}` of :math:`size= 50`
7
+ # To define the trajectories, we first get an LHS design in the box :math:`[0,1]^{20}` of size :math:`50`
8
8
# We set the number of trajectories input variables are randomly to 10.
9
9
10
10
# %%
11
11
import openturns as ot
12
12
import otmorris
13
13
import openturns .viewer as otv
14
14
15
+ # %%
15
16
# use the reference 20-d function from the Morris paper
16
17
f = ot .Function (otmorris .MorrisFunction ())
17
18
dim = f .getInputDimension ()
18
19
20
+ # %%
19
21
# Number of trajectories
20
22
r = 10
21
23
24
+ # %%
22
25
# Define an LHS experiment of size 50 in [0, 1]^20
23
26
size = 50
24
27
dist = ot .ComposedDistribution ([ot .Uniform (0 , 1 )] * dim )
29
32
X = morris_experiment .generate ()
30
33
Y = f (X )
31
34
35
+ # %%
32
36
# Evaluate Elementary effects (ee)
33
37
morris = otmorris .Morris (X , Y , bounds )
34
38
39
+ # %%
35
40
# Compute mu/sigma
36
41
mean = morris .getMeanAbsoluteElementaryEffects ()
37
42
sigma = morris .getStandardDeviationElementaryEffects ()
38
43
graph = morris .drawElementaryEffects (0 )
39
44
graph .setTitle ("Elementary Effects using LHS" )
40
45
view = otv .View (graph )
41
46
47
+ # %%
42
48
otv .View .ShowAll ()
You can’t perform that action at this time.
0 commit comments