sitivity analysis

MSIAM
Stochastic approaches for Uncertainty Quantification
Variance Based Global Sensitivity Analysis
Preliminaries
sourc,' ('ur.ir-')
I ibrary ( sens it ivity)
1
Study of the designs of experiments for sen-
sitivity analysis
Sobol' approach requires two designs X1 and X2.
For sobolÐff,sobolroalhs (package sensi,tiui,ty) we observe:
o the number of model evaluations,
o the way the points of the
Ns
<-
designs
fill the 2D space?
10
# Construction of th,e two ilesi,gns Xl and X2 (uni,forn d,istribution)
X1 <- data.frame(matrix(runif(4 x Ns), nrow = Ns))
ï'2 <- data.frame(matrix(runif (4 ,r Ns), nrow = Ns))
1
#
Method.e soboLEff
#
res-SobolEff<-soboIEff (nodeI=NULL, X1 , X2)
# Conponents oJ the object giuen by
(res-SobolEff)
str (res-SoboIEff)
names
# Si,ze of the d,esi,gn
diml.Ps-56bo1Ef f $X)
## 2D representati,ons
of
sobo
'^f4
eæperinents
of the points in the sampli,ngs
# we freeze the fi,rst d,i,recti,on
plot (res-SobolEff$X [1 :Ns, 1 : 2],xl-im=c(0, 1),y1im=c(0, 1) )
points(res-SobolEff$X[(Ns+t) : (2*¡s¡,!:2J,col-,blue,,pch=3)
$=
X,
51ìJt
C,I
L
(d*r)Ñ.
Ct
Cs
C\
2
#
# Methoile sobolroaLhs
#
res-Sobolroalhs
(-
t
sobolroalhs(model=NULL, factors=
,
NI
# Si,ze of th,e ilesign of eæperi,nents
dim
(res-SobolEff$X)
## 2D representations
of
th,e poi,nts
in the samplings
plot (res-Sobolroalhs$X [1 : Ns, 1 : 2],xIim=c(0, 1),yIim=c(0, 1))
points (res_Sobolroalhs$X [ (Ns+1) : (2*¡s¡, ! :2f ,coI=, blue,, pch=3)
sobolEff requires (d+1)l/" evaluations for all first-order Sobol' indices whereas
sobolroalhs requires only 2l/".
2
Sensitivity analysis for additive andf or mul-
tiplicative models
2.L Additive model
Perform the sensitivity analysis of the following model
Y:XI+X2
2.L.L
Case
1
Xt
Xz
- U(-1,7)
- U(-I,I)
What are the theoretical values of Sobol' indices?
# Si,ze
of both designs of
eæperinents (DoE)
n<-1000
3
order=1)
# constructi,on of botlt, DoE
<- data.frane(natrix(runif (2*n,-1, 1),nrow=n)
<- data. f rame (matrix(runif (2*n, -1, 1) ,nror^r=n)
XX1
XX2
)
)
# first-ord,er sens'iti,aitg ind,i,ces
res-sobo1Eff <- sobolEff (model=sornme2,XX1,XX2,nboot=100)
pri-nt (res-sobotEf f )
plot (res-soboIEff)
# totøL
ind,i,ces
tal' := soaot E/Jt
print(res-sobol ßtaLl t
:,)
res-sobolfô
plot
(rnodel=somme2,XX1,XX2,nboot=100,
(re s- s obollryfrt
Xv'llr",ü fX= I
2.L.2
V..' X
Case 2
Xt
Xz
- U(0,2)
* U(-I,7)
What are the theoretical values of Sobol' indices?
2.1.3
Case 3
Xt
Xz
-
U(-7,1)
(-2,2)
U
What are the theoretical values of Sobol' indices?
2.L.4
Case 4
Xt-U (-1,1)
Xz-N (o'å)
What are the theoretical values of Sobol' indices?
4
?
u/rr " o)
2.2
Multiplicative model
Y:XIxX2
2.2.L
Case
1
Xt
Xz
- U(-I,r)
-
U(-r,r)
What are the theoretical values of first-order Sobol' indices?
# Si,ze
of
both
DoE
n<-1000
# Construction of th,ese DoE
<- data.frame(matrix(runif (2*n,-1, 1),nrow=n))
<- data.frame(matrix(runif (2*n,-1, 1),nrow=n))
XX1
XX2
# first-order sensiti,ui,ty i,nd,i,ces
res-sobolEff <- sobolEff (roodel=produit2,XX1,XX2,nboot=100)
print (res-sobolEff)
plot (res-sobolEff$X)
plot (res-sobotEff)
5
2.2.2
Case 2
Xt
Xz
-
-
U(0,2)
U(-r,r)
What are the theoretical values of Sobof indices?
2.2.3
Case 3
Xt-U (- 1,1 )
Xz-N (o ' ,/sI )
What are the theoretical values of Sobol' indices?
3
'We
Study for the g-Sobol function
consider the g-functi,on introduced by Sobol'
(Xl) 'i :
7,... ,p: p independent variables, uniformly distributed
[0,1]. The g-functi,on is defined
as:
p
f(Xr,...,Xò:frS'{Xo)
i=L
with
g¿(X¿)
-
IAX¿-- 2l -t
I-fû¿
6
a¿
on
We consider the following cases:
Case l" : g-function, dimension 2 with
(at,az):
(99,1)
Case
2 : g-function,
dimension 10 with (or,or,,.., ar0)
:
(1,2, ..,10)
Case
3 : g-function,
dimension 10 with (or,ar,.., ør0)
:
(7,22,,..,10,)
7