Hi Lisa,

Nice to see you back on the list. I will first give you some insight on the 
role of 
FunctionalChaosAlgorithm/FunctionalChaosResult/FunctionalChaosRandomVector, but 
first a little summary on functional chaos expansion.

Given a function f:R^n->R^p, a random vector X with distribution D and a basis 
function (\Phi_n) orthonormal wrt an auxilliary distribution L, we are looking 
for an approximate stochastic representation of Y=f(X) in the form of:
\tilde{Y}=\tilde{g}(Z) where g=\sum_n a_n\Phi_n and Z~L

If (\Phi_n) are multivariate polynomials, it is called a polynomial chaos 
expansion. Note that if L is different from D (think about D being Weibull, L 
Uniform and \Phi_n Legendre polynomials) then, introducing an iso probabilistic 
transformation T such that T(X)~L, then:
\tilde{Y}=\tilde{g}(T(X))=\sum_n a_n\Phi_n(T(X))

which is another approximate representation of Y, this time in terms of X and 
not Z, from which we get an approximation of f:
\tilde{f}(x)=\sum_n a_n\Phi_n(T(x))


This time, it is no more a polynomial approximation as T is highly nonlinear 
and non-polynomial in general.

With this in mind, it is easier to understand the logic behind the OpenTURNS 
objects:
First, the pair FunctionalChaosAlgorithm/FunctionalChaosResult. It is a usual 
pattern in OpenTURNS (see OptimizationAlgorithm/OptimizationResult). When a 
computation is complex, it is done by an Algorithm class in 3 steps:
+ the creation of the algorithm with the relevant data
+ the computation by itself, using the run() method
+ the extraction of the result, using the getResult() method

The resulting object is a FunctionalChaosResult object, which contains a lot of 
information including first the meta-model \tilde{f} (the object you have to 
use as an approximation of your initial function) as it is the main result of 
the algorithm, and a lot of additional by-products (the elements to build 
\tilde{g}, T,...). As you said, \tilde{f} is in general more complex than a 
simple polynomial.

The FunctionalChaosRandomVector is the class in charge of the more advanced 
post-processing of the result:

+ it allows to sample the output of your initial function efficiently, using 
Y=\tilde{g}(Z) as L is fast to sample and \tilde{g} is a polynomial while 
\tilde{f} includes a potentially costly transformation T
+ it allows to compute Sobol indices and Sobol total indices of any order.

-> it is this object you have to use in order to compute these indices, and not 
the analytical expression of \tilde{f}.

The relevant documentation is here:
http://openturns.github.io/user_manual/response_surface/_generated/openturns.FunctionalChaosRandomVector.html?highlight=functionalchaosrandomvector


So for the meta-model, it is the getMetaModel() method of the 
FunctionalChaosResult class, and for the Sobol indices it is the 
getSobolIndex() method of the FunctionalChaosRandomVector class.

Best regards,

Régis
>________________________________
> De : Lisa RIVALIN <[email protected]>
>À : users <[email protected]> 
>Envoyé le : Lundi 27 juin 2016 18h08
>Objet : [ot-users] Polynomial chaos Results?
> 
>
>
>Hello OpenTURNS users,
>
>
>I would like to get a simple form of a degre 1 Polynomial Chaos Expansion as, 
>for instance: f(x1, x2, x3) = a x1 +b  x2 + c x3 +d
>
>
>It is known that Sobol indices can be calculated from the polynomial chaos.
>
>
>
>When I use ".getMetaModel()", I get a complex composite function and I can't 
>connect Sobol indices to my inputs.
>
>
>My goal is to re-use this simple function afterwards.
>
>
>
>
>Could you help me with that?
>
>
>
>
>All the best,
>
>
>Lisa
>
>
>
>
>_______________________________________________
>OpenTURNS users mailing list
>[email protected]
>http://openturns.org/mailman/listinfo/users
>
>
>
_______________________________________________
OpenTURNS users mailing list
[email protected]
http://openturns.org/mailman/listinfo/users

Reply via email to