<< nisp_bruteforcesa Sensitivity Analysis nisp_sobolsaFirst >>

NISP >> NISP > Sensitivity Analysis > nisp_sobolsaAll

nisp_sobolsaAll

Compute sensitivity indices by Sobol, Ishigami, Homma.

Calling Sequence

si = nisp_sobolsaAll ( func , nx )
si = nisp_sobolsaAll ( func , nx , randgen )
si = nisp_sobolsaAll ( func , nx , randgen , n )
si = nisp_sobolsaAll ( func , nx , randgen , n , inrange)
[ si , nbevalf ] = nisp_sobolsaAll ( ... )
[ si , nbevalf , mi ] = nisp_sobolsaAll ( ... )

Parameters

func :

a function or a list, the name of the function to be evaluated.

nx :

a 1-by-1 matrix of floating point integers, the number of inputs of the function.

randgen :

a function or a list, the random number generator. (default = uniform random variables)

n :

a 1-by-1 matrix of floating point integers (default n=10000), the number of Monte-Carlo experiments, for each sensitivity index

inrange :

a 1-by-1 matrix of booleans (default inrange = %t), set to true to restrict the sensitivity indices into [0,1].

si :

a m-by-1 matrix of doubles, the partial sensitivity indices.

nbevalf :

a nx-by-1 matrix of doubles, the actual number of function evaluations.

mi :

a m-by-nx matrix of doubles, the multi-indices of the variables in si, where m=2^nx - 1. Each row in mi represents a group of variables. We have mi(k,i) = 1 if Xi is in the group of variables and 0 if not.

Description

The algorithm uses the Sobol method to compute the partial sensitivity indices.

This method assumes that all the input random variables are independent.

On output, the sensitivity indices are forced to be in the range [0,1].

Any optional input argument equal to the empty matrix will be set to its default value.

See the nisp_sobolFirst function for the management of func and randgen.

Examples

// Compute the partial sensitivity indices of the ishigami function.
// Three random variables uniform in [-pi,pi].
function y=ishigami(x)
a=7.
b=0.1
s1=sin(x(:,1))
s2=sin(x(:,2))
x34 = x(:,3).^4
y(:,1) = s1 + a.*s2.^2 + b.*x34.*s1
endfunction
function x=myrandgen(m, i)
x = distfun_unifrnd(-%pi,%pi,m,1)
endfunction
a=7.;
b=0.1;
exact = nisp_ishigamisa ( a , b )
n = 1000;
nx = 3;
[ si , nbevalf , mi ] = nisp_sobolsaAll ( ishigami , nx , myrandgen )
// The ANOVA decomposition can be seen more easily in
[mi si]
// The sum of si is 1.
sum(si) // expected = 1.

Authors


Report an issue
<< nisp_bruteforcesa Sensitivity Analysis nisp_sobolsaFirst >>