From michael.baudin at edf.fr Wed Feb 14 12:30:54 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Wed, 14 Feb 2018 11:30:54 +0000
Subject: [otusers] Simplified symbolic functions
MessageID: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
Hi,
I have a symbolic function that I would like to simplify and I do not see how.
Here is the test case. The function has 8 inputs and 2 outputs. In Python it is simple to define :
def functionCrue(X) :
Q, Ks, Zv, Zm, Hd, Zb, L, B = X
alpha = (Zm  Zv)/L
H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
Zc = H + Zv
Zd = Zb + Hd
S = Zc  Zd
return [H,S]
myFunction = PythonFunction(8, 2, functionCrue)
As you can see, the code is simplified by intermediate variables which are used by subsequent Python statements. For exemple, the slope of the river alpha is first computed, then the height H is computed depending on the slope. Then the variable S is computed based on Zc and Zd, where Zc is computed depending on the height H.
When I define the function as a symbolic function, the current definition is more involved.
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formulas = ['(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)+Zv(Zb + Hd)']
myFunction = SymbolicFunction(inputs, formulas)
As you can see, I cannot reuse the value of the first output into the second output.
The following interface would be much easier to use. The formulas variable is a list of couples, where the first item is the name of the output variable and the second item is the string to evaluate it.
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
output1 = ['alpha', '(Zm  Zv)/L']
output2 = ['H', '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
output3 = ['Zc', 'H + Zv']
output4 = ['Zd', 'Zb + Hd']
output5 = ['S', 'Zc  Zd']
formulas = [output1,output2,output3,output4,output5]
myFunction = SymbolicFunction(inputs, formulas)
Is there another way of doing this ? Do you agree that the suggestion is worth being developed ?
Best regards,
Micha?l
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
 next part 
A nontext attachment was scrubbed...
Name: crue8I3Opropagationsimple.py
Type: application/octetstream
Size: 2243 bytes
Desc: crue8I3Opropagationsimple.py
URL:
From schueller at phimeca.com Wed Feb 14 14:38:15 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Wed, 14 Feb 2018 13:38:15 +0000
Subject: [otusers] Simplified symbolic functions
InReplyTo: <20180214113111.36889EDA63_A841DFFB@smtp.datacenter.ibo.fr>
References: <20180214113111.36889EDA63_A841DFFB@smtp.datacenter.ibo.fr>
MessageID: <71b3133a2ef44cf6a0800fa690bcb6ac@phimeca.com>
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Wed Feb 14 16:18:25 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Wed, 14 Feb 2018 15:18:25 +0000 (UTC)
Subject: [otusers] Simplified symbolic functions
InReplyTo: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
References: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID: <1671113333.854601.1518621505461@mail.yahoo.com>
Hi Michael,
You can try this:
from openturns import *from math import sqrt
def functionCrue(X) :
? ? Q, Ks, Zv, Zm, Hd, Zb, L, B = X
? ? alpha = (Zm  Zv)/L
? ? H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
? ? Zc = H + Zv
? ? Zd = Zb + Hd
? ? S = Zc  Zd
? ? return [H,S]
myFunction = PythonFunction(8, 2, functionCrue)
f = SymbolicFunction(["Q", "Ks", "Zv", "Zm", "Hd", "Zb", "L", "B"], ["(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)", "Zv  (Zb + Hd)"])g = SymbolicFunction(["x", "y"], ["x", "x + y"])
mySymbolicFunction = ComposedFunction(g, f)
# To check that everything is oksize = 1000sample = ComposedDistribution([Uniform(1.0, 2.0), Uniform(1.0, 2.0), Uniform(1.0, 2.0), Uniform(3.0, 4.0), Uniform(1.0, 2.0), Uniform(1.0, 2.0), Uniform(1.0, 2.0), Uniform(1.0, 2.0)]).getSample(size)
delta = myFunction(sample)  mySymbolicFunction(sample)print(delta.computeRawMoment(2))
It is not a generic solution as it uses the specific structure of your formulas but it works. Concerning the performance, the solution based on PythonFunction gives a speed of 73473 evals/s, the solution based on a composition of symbolic functions gives a speed of 1616000 evals/s (22x faster) and the solution using only one symbolic function where H is duplicated gives a speed of 2121000 evals/s (29x faster). If you want to perform a large sample Monte Carlo simulation it may change things...
Cheers
R?gis
Le mercredi 14 f?vrier 2018 ? 12:31:01 UTC+1, BAUDIN Michael a ?crit :
??
Hi,
?
I have a symbolic function that I would like to simplify and I do not see how.
?
Here is the test case. The function has 8 inputs and 2 outputs. In Python it is simple to define :
?
def functionCrue(X) :
??? Q, Ks, Zv, Zm, Hd, Zb, L, B = X
??? alpha = (Zm  Zv)/L
??? H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
??? Zc = H + Zv
??? Zd = Zb + Hd
??? S = Zc  Zd
??? return [H,S]
myFunction = PythonFunction(8, 2, functionCrue)
?
As you can see, the code is simplified by intermediate variables which are used by subsequent Python statements. For exemple, the slope of the river alpha is first computed, then the height H is computed depending on the slope. Then the variable S is computed based on Zc and Zd, where Zc is computed depending on the height H.
?
When I define the function as a symbolic function, the current definition is more involved.
?
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formulas = ['(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)+Zv(Zb + Hd)']
myFunction = SymbolicFunction(inputs, formulas)
?
As you can see, I cannot reuse the value of the first output into the second output.
?
The following interface would be much easier to use. The formulas variable is a list of couples, where the first item is the name of the output variable and the second item is the string to evaluate it.
?
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
output1 = [?alpha?, '(Zm  Zv)/L']
output2 = [?H?, '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
output3 = [?Zc?, 'H + Zv']
output4 = [?Zd?, 'Zb + Hd']
output5 = [?S?, 'Zc  Zd']
formulas = [output1,output2,output3,output4,output5]
myFunction = SymbolicFunction(inputs, formulas)
?
Is there another way of doing this ? Do you agree that the suggestion is worth being developed ?
?
Best regards,
?
Micha?l
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
users Info Page


 
users Info Page



 next part 
An HTML attachment was scrubbed...
URL:
From bouzim at gmail.com Mon Mar 12 21:26:13 2018
From: bouzim at gmail.com (D. Barbier)
Date: Mon, 12 Mar 2018 21:26:13 +0100
Subject: [otusers] Simplified symbolic functions
InReplyTo: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
References: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID:
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of
muParser, it is known to be faster.
Almost all muParser formulas can be parsed by ExprTk without changes,
but it also provides many more features. And multiple outputs are
trivial with this backend.
This has been implemented on current master, your example can be written:
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
outputs = ['H', 'S']
formula = """var alpha := (Zm  Zv)/L;
H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0);
var Zc := H + Zv;
var Zd := Zb + Hd;
S := Zc  Zd;"""
myFunction = SymbolicFunction(inputs, outputs, formula)
This is almost straightforward; input and output variables are
declared, all other variables must be prefixed by the keyword 'var',
assignment is ':=', and statements must be separated by semicolons.
But Python can be as fast as SymbolicFunction; pull request #699
avoids copies between OT and Python, your code could be rewritten as
import numpy as np
def functionCrueSample(X) :
Q, Ks, Zv, Zm, Hd, Zb, L, B = np.array(X, copy=False).T
alpha = (Zm  Zv)/L
H = (Q/(Ks*B*np.sqrt(alpha)))**(3.0/5.0)
Zc = H + Zv
Zd = Zb + Hd
S = Zc  Zd;
Y = np.zeros((len(H), 2))
Y[:,0] = H
Y[:,1] = S
return Y
myFunction = PythonFunction(8, 2, func_sample=functionCrueSample)
Denis
20180214 12:30 GMT+01:00 BAUDIN Michael :
> Hi,
>
>
>
> I have a symbolic function that I would like to simplify and I do not see
> how.
>
>
>
> Here is the test case. The function has 8 inputs and 2 outputs. In Python it
> is simple to define :
>
>
>
> def functionCrue(X) :
>
> Q, Ks, Zv, Zm, Hd, Zb, L, B = X
>
> alpha = (Zm  Zv)/L
>
> H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
>
> Zc = H + Zv
>
> Zd = Zb + Hd
>
> S = Zc  Zd
>
> return [H,S]
>
> myFunction = PythonFunction(8, 2, functionCrue)
>
>
>
> As you can see, the code is simplified by intermediate variables which are
> used by subsequent Python statements. For exemple, the slope of the river
> alpha is first computed, then the height H is computed depending on the
> slope. Then the variable S is computed based on Zc and Zd, where Zc is
> computed depending on the height H.
>
>
>
> When I define the function as a symbolic function, the current definition is
> more involved.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> formulas = ['(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm 
> Zv)/L)))^(3.0/5.0)+Zv(Zb + Hd)']
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> As you can see, I cannot reuse the value of the first output into the second
> output.
>
>
>
> The following interface would be much easier to use. The formulas variable
> is a list of couples, where the first item is the name of the output
> variable and the second item is the string to evaluate it.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> output1 = [?alpha?, '(Zm  Zv)/L']
>
> output2 = [?H?, '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
>
> output3 = [?Zc?, 'H + Zv']
>
> output4 = [?Zd?, 'Zb + Hd']
>
> output5 = [?S?, 'Zc  Zd']
>
> formulas = [output1,output2,output3,output4,output5]
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> Is there another way of doing this ? Do you agree that the suggestion is
> worth being developed ?
>
>
>
> Best regards,
>
>
>
> Micha?l
>
>
> Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis
> ? l'intention exclusive des destinataires et les informations qui y figurent
> sont strictement confidentielles. Toute utilisation de ce Message non
> conforme ? sa destination, toute diffusion ou toute publication totale ou
> partielle, est interdite sauf autorisation expresse.
>
> Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le
> copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie.
> Si vous avez re?u ce Message par erreur, merci de le supprimer de votre
> syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur
> quelque support que ce soit. Nous vous remercions ?galement d'en avertir
> imm?diatement l'exp?diteur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute
> erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely for the
> addressees. The information contained in this Message is confidential. Any
> use of information contained in this Message not in accord with its purpose,
> any dissemination or disclosure, either whole or partial, is prohibited
> except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use any
> part of it. If you have received this message in error, please delete it and
> all copies from your system and notify the sender immediately by return
> message.
>
> Email communication cannot be guaranteed to be timely secure, error or
> virusfree.
>
>
> _______________________________________________
> OpenTURNS users mailing list
> users at openturns.org
> http://openturns.org/mailman/listinfo/users
>
From schueller at phimeca.com Thu Mar 15 10:32:02 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Thu, 15 Mar 2018 09:32:02 +0000
Subject: [otusers] User day #11
MessageID: <333d7d48badb4ce0bea169b6d1f8e38f@phimeca.com>
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Fri Mar 16 14:53:53 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Fri, 16 Mar 2018 13:53:53 +0000
Subject: [otusers] Simplified symbolic functions
InReplyTo:
References: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID:
Hi Denis,
Thank you for the input and the work on ExprTk.
These new features will greatly simplify the expressions. I think that this can be used in the graphical user interface of OpenTURNS, in order to manage more complex expressions.
Best regards,
Micha?l
Message d'origine
De?: bouzim at gmail.com [mailto:bouzim at gmail.com]
Envoy??: lundi 12 mars 2018 21:26
??: BAUDIN Michael
Cc?: users at openturns.org
Objet?: Re: [otusers] Simplified symbolic functions
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of muParser, it is known to be faster.
Almost all muParser formulas can be parsed by ExprTk without changes, but it also provides many more features. And multiple outputs are trivial with this backend.
This has been implemented on current master, your example can be written:
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B'] outputs = ['H', 'S'] formula = """var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd;"""
myFunction = SymbolicFunction(inputs, outputs, formula)
This is almost straightforward; input and output variables are declared, all other variables must be prefixed by the keyword 'var', assignment is ':=', and statements must be separated by semicolons.
But Python can be as fast as SymbolicFunction; pull request #699 avoids copies between OT and Python, your code could be rewritten as
import numpy as np
def functionCrueSample(X) :
Q, Ks, Zv, Zm, Hd, Zb, L, B = np.array(X, copy=False).T
alpha = (Zm  Zv)/L
H = (Q/(Ks*B*np.sqrt(alpha)))**(3.0/5.0)
Zc = H + Zv
Zd = Zb + Hd
S = Zc  Zd;
Y = np.zeros((len(H), 2))
Y[:,0] = H
Y[:,1] = S
return Y
myFunction = PythonFunction(8, 2, func_sample=functionCrueSample)
Denis
20180214 12:30 GMT+01:00 BAUDIN Michael :
> Hi,
>
>
>
> I have a symbolic function that I would like to simplify and I do not
> see how.
>
>
>
> Here is the test case. The function has 8 inputs and 2 outputs. In
> Python it is simple to define :
>
>
>
> def functionCrue(X) :
>
> Q, Ks, Zv, Zm, Hd, Zb, L, B = X
>
> alpha = (Zm  Zv)/L
>
> H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
>
> Zc = H + Zv
>
> Zd = Zb + Hd
>
> S = Zc  Zd
>
> return [H,S]
>
> myFunction = PythonFunction(8, 2, functionCrue)
>
>
>
> As you can see, the code is simplified by intermediate variables which
> are used by subsequent Python statements. For exemple, the slope of
> the river alpha is first computed, then the height H is computed
> depending on the slope. Then the variable S is computed based on Zc
> and Zd, where Zc is computed depending on the height H.
>
>
>
> When I define the function as a symbolic function, the current
> definition is more involved.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> formulas = ['(Q/(Ks*B*sqrt((Zm 
> Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)+Zv(Zb +
> Hd)']
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> As you can see, I cannot reuse the value of the first output into the
> second output.
>
>
>
> The following interface would be much easier to use. The formulas
> variable is a list of couples, where the first item is the name of the
> output variable and the second item is the string to evaluate it.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> output1 = [?alpha?, '(Zm  Zv)/L']
>
> output2 = [?H?, '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
>
> output3 = [?Zc?, 'H + Zv']
>
> output4 = [?Zd?, 'Zb + Hd']
>
> output5 = [?S?, 'Zc  Zd']
>
> formulas = [output1,output2,output3,output4,output5]
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> Is there another way of doing this ? Do you agree that the suggestion
> is worth being developed ?
>
>
>
> Best regards,
>
>
>
> Micha?l
>
>
> Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont
> ?tablis ? l'intention exclusive des destinataires et les informations
> qui y figurent sont strictement confidentielles. Toute utilisation de
> ce Message non conforme ? sa destination, toute diffusion ou toute
> publication totale ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'?tes pas le destinataire de ce Message, il vous est interdit
> de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie.
> Si vous avez re?u ce Message par erreur, merci de le supprimer de
> votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune
> trace sur quelque support que ce soit. Nous vous remercions ?galement
> d'en avertir imm?diatement l'exp?diteur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de
> toute erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely
> for the addressees. The information contained in this Message is
> confidential. Any use of information contained in this Message not in
> accord with its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or
> use any part of it. If you have received this message in error, please
> delete it and all copies from your system and notify the sender
> immediately by return message.
>
> Email communication cannot be guaranteed to be timely secure, error
> or virusfree.
>
>
> _______________________________________________
> OpenTURNS users mailing list
> users at openturns.org
> http://openturns.org/mailman/listinfo/users
>
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
From schueller at phimeca.com Fri Apr 13 16:02:06 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Fri, 13 Apr 2018 14:02:06 +0000
Subject: [otusers] OpenTURNS 1.11 rc1 released!
MessageID: <4f7ce1712fce4b6eb65fa30e2e25de48@phimeca.com>
Hello users,
OpenTURNS 1.11 RC1 was just released.
As usual feedback is very much welcome on this release candidate until the final release in May.
It features overall work on the performance, a unified documentation, domains arithmetic, asymptotic Sobol' estimators and more.
The full changelog can be seen here:
https://github.com/openturns/openturns/blob/v1.11rc1/ChangeLog
The binary packages are available via the usual channels, except for the otconda installer which is on the way.
You can also try the newly built pip packages:
pip install openturns

The OpenTURNS team
From schueller at phimeca.com Mon May 14 16:51:45 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Mon, 14 May 2018 14:51:45 +0000
Subject: [otusers] [ANN] OpenTURNS 1.11 released
MessageID:
Hello users,
OpenTURNS 1.11 final was just released.
It features an overall work on the performance, a unified documentation, domains arithmetic, asymptotic Sobol' estimators and more.
The full changelog can be seen here:
https://github.com/openturns/openturns/blob/v1.11/ChangeLog
The binary packages are available via the usual channels, plus the new pip packages and the otconda bundle.
Thank you for the bug reports during the release candidate stage.

The OpenTURNS team
From A.Laera at plaxis.nl Tue May 22 16:30:03 2018
From: A.Laera at plaxis.nl (Anita Laera)
Date: Tue, 22 May 2018 16:30:03 +0200
Subject: [otusers] Correlation coefficients  FORM
MessageID:
Hi,
I want to correctly use the correlation coefficients in the FORM analysis I
am performing using AbdoRackwitz algorithm.
To study their effect, I have considered an elementary case with two
variables both normally distributed with mean equal to 0 and standard
deviation equal to 1.
In this way, if not correlated, they are transformed to two variables with
mean equal to 0 and standard deviation equal to 1 in the standard space.
The limit state function is of the type y = variable_1 + variable_2 and the
threshold is set to 10.
This is an extremely simple case with the only purpose of understanding how
the correlation works.
I have set the gradient step size equal to 1 for both variables and I am
using a centered finite difference gradient.
In the case of independent variables, starting from the mean point (0, 0),
4 evaluations are performed to compute the gradient:
1  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
2  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
3  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
4  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
The first point of the line search is in (5, 5) (for both physical and
standard space). I can determine this based on the gradient [1, 1] and on
the value of lambda equal to 5.
If I correlate the two variables by specifying a CorrelationMatrix with
coefficient of correlation equal to 0.5 and assigned a NormalCopula to the
correlation matrix, I obtain (after the calculation in the mean point):
1  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735
(standard space), y = 1
2  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735
(standard space), y = 1
3  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547
(standard space), y = 1
4  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547
(standard space), y = 1
The first point of the line search is in (5, 5) for the physical space,
corresponding to (5, 2.8867) in the standard space.
I can't determine how the gradient, and then the first point for the line
search, is calculated.
Could you please help me with this?

*Anita Laera*, *Researcher*
[image: Plaxis:]
Plaxis bv  Competence Centre GeoEngineering
P.O. Box 572  2600 AN Delft  The Netherlands
Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
Follow us: [image: Facebook:] [image:
Twitter:] [image: LinkedIn:]
 next part 
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Thu May 31 19:22:02 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Thu, 31 May 2018 17:22:02 +0000 (UTC)
Subject: [otusers] Correlation coefficients  FORM
InReplyTo:
References:
MessageID: <1851056373.661866.1527787322744@mail.yahoo.com>
Hi Anita,
As the computations are done in the standard space, the standard limit state function is the composition of the physical space function (f(x,y)=x+y) and the inverse isoprobabilistic transformation. As your input distribution is Gaussian (Gaussian marginals and Gaussian copula), this transformation is linear, hence the standard limit state function is linear and the finite difference gradient is exact (no approximation).
The isoprobabilistic transformation used in OpenTURNS is based on the Cholesky factor of the covariance matrix of the standard representative of the copula, which is somewhat arbitrary as explained in?https://www.sciencedirect.com/science/article/pii/S0266892009000307?or in?https://tel.archivesouvertes.fr/tel00913510?(title in French but content in English), Chapter 5, Section 4.
This transformation corresponds to the identity function if the correlation is zero (independence in the Gaussian copula case) and to a linear transformation in which u_1 depends only on x and u_2 on both x and y, where u_1 and u_2 are the standard space coordinates. It corresponds to a choice of conditioning order of the corresponding Rosenblatt transformation. As a result, the standard space design point is not on the first diagonal, which has no influence on the reliability index and the FORM approximation (which is exact here) of the event probability. IMO the importance factors in standard space have no immediate meaning in the case of dependent inputs.
I join a script to illustrate the case.
Best regards
R?gis
Le jeudi 31 mai 2018 ? 10:26:41 UTC+2, Anita Laera a ?crit :
Hi,
I want to correctly use the correlation coefficients in the FORM analysis I am performing using AbdoRackwitz algorithm.
To study their effect, I have considered an elementary case with two variables both normally distributed with mean equal to 0 and standard deviation equal to 1.
In this way, if not correlated, they are transformed to two variables with mean equal to 0 and standard deviation equal to 1 in the standard space.
The limit state function is of the type y = variable_1 + variable_2 and the threshold is set to 10.
This is an extremely simple case with the only purpose of understanding how the correlation works.
I have set the gradient step size equal to 1 for both variables and I am using a centered finite difference gradient.
In the case of independent variables, starting from the mean point (0, 0), 4 evaluations are performed to compute the gradient:
1  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
2  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
3  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
4  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
The first point of the line search is in (5, 5) (for both physical and standard space). I can determine this based on the gradient [1, 1] and on the value of lambda equal to 5.
If I correlate the two variables by specifying a CorrelationMatrix with coefficient of correlation equal to 0.5 and assigned a NormalCopula to the correlation matrix, I obtain (after the calculation in the mean point):
1  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735 (standard space), y = 1
2  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735 (standard space), y = 1
3  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547 (standard space), y = 1
4  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547 (standard space), y = 1
The first point of the line search is in (5, 5) for the physical space, corresponding to (5, 2.8867) in the standard space.
I can't determine how the gradient, and then the first point for the line search, is calculated.
Could you please help me with this?

Anita Laera, Researcher
Plaxis bv  Competence Centre GeoEngineering
P.O. Box 572  ?2600 AN Delft  The Netherlands
Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
Follow us:?_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
 next part 
A nontext attachment was scrubbed...
Name: anita_laera_31_05.py
Type: text/xpython
Size: 1133 bytes
Desc: not available
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Thu May 31 22:12:54 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Thu, 31 May 2018 20:12:54 +0000 (UTC)
Subject: [otusers] Some doubts on Polynomial Chaos
InReplyTo: <1886929613.70315679.1512996869482.JavaMail.zimbra@cerfacs.fr>
References: <1886929613.70315679.1512996869482.JavaMail.zimbra@cerfacs.fr>
MessageID: <1790527491.7367401.1527797574743@mail.yahoo.com>
Hi Andrea,
Nice to see you on the list. The theoretical part of the documentation is being converted into the new format based on sphinx. In the mean time, you can use the old LaTeX documentation here:http://doc.openturns.org/old/openturns1.7/16.03/pdf/OpenTURNS_ReferenceGuide.pdf
Concerning your questions:1) The PenalizedLeastSquaresAlgorithm allows to define a general quadratic penalization when used directly, but no penalization is done when used through the LeastSquaresStrategy class (and there is no penalization based on second derivatives)2) It all depends on what you call 'performant'. If your model is not sparse, there is no gain in using the LARS (Least Angle Regression Stagewise) class, improperly named LAR in the initial version of the class. See page 239 in the PDF file.3) In the initial version of the PC algorithm (2007), the specifications were to implement only the fixed strategy, ie no basis selection. I introduced the SequentialStrategy and CleaningStrategy as naive examples of adaptive strategies, and planned to implement ridge regression as an evolution of CleaningStrategy, but never found the time for it. Now, SequentialStrategy is mainly useless, and CleaningStrategy is of marginal interest (it allows to fix the maximum complexity of the resulting metamodel but nothing more).
Here is an example of what could be a simplified interface to the FunctionalChaosAlgorithm class (not tested ;)):
import openturns as ot
def learnPC(x, y, inputDistribution, basisSize=10, hyperbolicity=0.7):? ? inputDimension = len(x[0])? ? # Use an isotropic hyperbolic enumerate function to favor high marginal degrees? ? enumerateFunction = ot.EnumerateFunction(inputDimension, hyperbolicity)? ? # Build the adapted polynomial basis? ? orthogonalBasis = ot.OrthogonalProductPolynomialFactory([ot.StandardDistributionPolynomialFactory(inputDistribution.getMarginal(i)) for i in range(inputDimension)], enumerateFunction)? ? approximationAlgorithm = ot.LeastSquaresMetaModelSelectionFactory(ot.LARS(), ot.CorrectedLeaveOneOut())? ? maximumResidual = 1e10? ? adaptiveStrategy = ot.FixedStrategy(orthogonalBasis, enumerateFunction.getStrataCumulatedCardinal(basisSize))? ? projectionStrategy = ot.LeastSquaresStrategy(x, y, approximationAlgorithm)? ? algo = ot.FunctionalChaosAlgorithm(x, y, inputDistribution, adaptiveStrategy, projectionStrategy)? ? algo.setMaximumResidual(maximumResidual)? ? algo.run()? ? result = algo.getResult()? ? metaModel = result.getMetaModel()? ? return metaModel, result
Best regards,
R?gis
Le jeudi 31 mai 2018 ? 10:26:40 UTC+2, Andrea TRUCCHIA a ?crit :
Dear User Community of OT,
I am a researcher at CERFACS that is using OT as an important part of his PhD thesis.
I have been trying to find a combinations of best procedures that would help me giving reasonably good results for a wide range of forest fire simulations, having 2 or 3 input parameters.
The methods I have been using recently for the PC are
 for the Truncature part of the algorithm, an ot.FixedStrategy()? with linear EnumerateFunction().? I have planned to try some hyperbolic truncature as soon as possible.
for the ProjectionStrategy, aside from the quadrature method, that is quite expensive regarding the number of DOE points to be evaluated, I tried
 ot.LeastSquareStrategy(X,Y) , the default one that I? imagine is a Penalized Least Square algorithm (but without explicitly setting a penalty parameter)
 ot.LeastSquareStrategy(X, Y, LeastSquaresMetaModelSelectionFactory(LARS(),CorrectedLeaveOneOut() )
The questions I have right now are
1) Where can I find some documentation about the Penalized Least Square algorithm implemented in LeastSquareStrategy ? Is the penalty applied in the code? related to the second derivatives of the response surface?
2) Is the LARS() the most performant algorithm we have in PC right now, in the OpenTurns framework? Is there any difference between calling LAR() and LARS() ? Where can I find a documentation for the real "flavour" of the LARS() implemented?
3) Where can I find some example of the implementation of an AdaptiveStrategy, in the form of a? SequentialStrategy or CleaningStrategy ? Talkin about a wide range of applications, i.e.? do not dealing with? a specific problem, are they worth the effort of their implementation?
Thanks in advance to anyone who will reply
Best Regards
Andrea Trucchia
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Mon Jun 18 16:53:11 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Mon, 18 Jun 2018 14:53:11 +0000
Subject: [otusers] Grouped Sobol indices
MessageID: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
Hi !
I have a computer code with dependent input vector and I would like to perform sensitivity analysis on the vector output. To do this, I would like to estimate the Sobol' indices. In order to workaround the dependent inputs, I would like to gather dependent input variables into independent groups and to estimate the Sobol' indices on these groups.
? My first idea is to use a chaos expansion in order to estimate Sobol' indices. It is easy to estimate the first order Sobol' indices with the getSobolGroupedIndex method of the FunctionnalChaosSobolIndices class:
http://openturns.github.io/openturns/master/user_manual/response_surface/_generated/openturns.FunctionalChaosSobolIndices.html
However, the corresponding total order indices method seem to be unavailable: there is no getSobolGroupedTotalIndex ?
If so, this is a pity, since this is just another "simple" arrangement of the coefficients from the chaos expansion. It would allow to estimate the total effect of a group. Compared to the group Sobol first indice, it would allow to see if there are interactions with this group and other variables outside from the group. Also, if the group Sobol total indice is close to zero, this means that this group has no effect of the variability of the output.
? The second topic of my post is the SobolIndicesAlgorithm class :
http://openturns.github.io/openturns/master/user_manual/_generated/openturns.SobolIndicesAlgorithm.html
I can see that there is no "group" method here. Is there a theoretical way of computing grouped Sobol' indices with these estimators?
? Finally, I would like to know if there is a way of using the joint distribution in order to generate the independent groups of dependent input variables? In other words, with a given multivariate joint distribution, is there a way of generating a list of sublists of indices such that:
o Each sublist contain dependent variables,
o Two sublists are independent.
With such a goal, what classes / methods to use ?
Best regards,
Micha?l
PS
By the way, the total Sobol' indices of a group of variables lead to a way of removing input variables from the model. Indeed, we could compute the largest group having a total Sobol' indice lower than a given small threshold (says 0.01 for example). By design, all variables from this group could be replaced by fixed inputs without changing the variability of the output. Furthermore, if we had the distribution of this estimator, we could guarantee this property with, say, 95% confidence (i.e. including the variability from the estimate).
In order to compute this group, the variables could first be ordered by decreasing total Sobol' indices. Then, we could add the variables into the group until the total Sobol' indice exceeds the threshold: the final group is the one just before this step.
With this raw algorithm, the chaos expansion has a great advantage: given that the decomposition is known, the estimate is almost CPUfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From roy at cerfacs.fr Mon Jun 18 17:55:09 2018
From: roy at cerfacs.fr (roy)
Date: Mon, 18 Jun 2018 17:55:09 +0200
Subject: [otusers] Sobol indices with Saltelli2010 and Sobol sequence
MessageID:
Hi everyone!
From the documentation, Sobol? indices with Saltelli's formulation are computed using its 2002 formula.
In Saltelli2010, there is another formulation which is demonstrated to be better.
Another point, there is the possibility to use an experiment in SobolIndicesExperiment(). But it is not possible to use Sobol? sequence here.
It would be great to add this possibility as it is known to converge faster than the MonteCarloExperiment(). To get A and B with Sobol? sequence,
we must split the matrix vertically:
input_design = np.array(ot.SobolSequence(dim * 2).generate(size))
A = input_design[:, :dim]
B = input_design[:, dim:]
Another possibility is to use Sobol? scrambled and split horizontally. But from what I know, this sampler is not available in OT?
From the documentation, it is not really clear that the matrices are stacked as [A, B, A_B, B_A]. I had to look at the code to really
understand that. Maybe this could be improved?
Thanks for the support :)
Pamphile ROY
PhD candidate in Uncertainty Quantification
CERFACS??Toulouse (31)?France
+33 (0) 5 61 19 31 57
+33 (0) 7 86 43 24 22
 next part 
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Mon Jun 18 23:08:59 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Mon, 18 Jun 2018 21:08:59 +0000 (UTC)
Subject: [otusers] Sobol indices with Saltelli2010 and Sobol sequence
InReplyTo:
References:
MessageID: <1180416353.2314830.1529356139055@mail.yahoo.com>
Hi Pamphile,
I don't know what are the differences between Saltelli 2002 and Saltelli 2010 as it is not my main field of interest, but OpenTURNS proposes alternative sampling algorithms to compute Sobol indices (first and second order).You are not forced to use a Monte Carlo sampling, you can use any weighted experiment with uniform weights, including LHS experiment and low discrepancy experiments. It is demonstrated in the following script:
===== BEGIN =====from openturns import *
mode = "QMC"size = 10000
# Toy modelmodel = SymbolicFunction(["x0", "x1", "x2", "x3"], ["x0+x1+x2+x3+x1*x2"])
# Here you can use any multivariate distribution with independent copuladistribution = Normal(4)if mode == "QMC":? ? sampling_doe = LowDiscrepancyExperiment(SobolSequence(4), distribution, size, False)? ? sampling_doe.setRandomize(True) # If set to False, the results are wrong? ? sampling_doe.setRestart(False) # or Trueelif mode == "LHS":? ? sampling_doe = LHSExperiment(distribution, size)? ? sampling_doe.setAlwaysShuffle(True) # If set to False, the results are wrong? ? sampling_doe.setRandomShift(False) # or Trueelse:? ? sampling_doe = MonteCarloExperiment(distribution, size)sobol_doe = SobolIndicesExperiment(sampling_doe, True)inputDesign = sobol_doe.generate()outputDesign = model(inputDesign)
# Example of use with the different Sobol algorithmsLog.Show(Log.NONE)algo = JansenSensitivityAlgorithm(inputDesign, outputDesign, size)print("Jansen")print("First order=", algo.getFirstOrderIndices())print("Second order=", algo.getSecondOrderIndices())algo = MartinezSensitivityAlgorithm(inputDesign, outputDesign, size)print("Martinez")print("First order=", algo.getFirstOrderIndices())print("Second order=", algo.getSecondOrderIndices())algo = MauntzKucherenkoSensitivityAlgorithm(inputDesign, outputDesign, size)print("MauntzKucherenko")print("First order=", algo.getFirstOrderIndices())print("Second order=", algo.getSecondOrderIndices())algo = SaltelliSensitivityAlgorithm(inputDesign, outputDesign, size)print("Saltelli")print("First order=", algo.getFirstOrderIndices())print("Second order=", algo.getSecondOrderIndices())===== END =====
Note that you have to tweak a little bit the LowDiscrepancyExperiment and LHSExperiment classes to get correct results. The fact that the permutation has to be regenerated each time an LHS experiment is sampled is quite natural, but the fact that the low discrepancy sequence has to be randomly shifted is less clear to me... I have not played with the other low discrepancy sequences (Halton, Faure etc) to see if this behavior is general or not.
Best regards,
R?gis LEBRUN
Le lundi 18 juin 2018 ? 17:54:52 UTC+2, roy a ?crit :
Hi everyone!
>From the documentation, Sobol? indices with Saltelli's formulation are computed using its 2002 formula.In Saltelli2010, there is another formulation which is demonstrated to be better.
Another point, there is the possibility to use an experiment in SobolIndicesExperiment(). But it is not possible to use Sobol? sequence here.It would be great to add this possibility as it is known to converge faster than the MonteCarloExperiment().?To get A and B with Sobol? sequence,we must split the matrix?vertically:?
input_design = np.array(ot.SobolSequence(dim * 2).generate(size))A = input_design[:, :dim]B = input_design[:, dim:]
Another possibility is to use Sobol? scrambled and split horizontally. But from what I know, this sampler is not available in OT?
>From the documentation, it is not really clear that the matrices are stacked as?[A, B, A_B, B_A]. I had to look at the code to reallyunderstand that. Maybe this could be improved?
Thanks for the support :)
Pamphile ROY
PhD candidate in Uncertainty Quantification
CERFACS??Toulouse (31)?France
+33 (0) 5 61 19 31 57
+33 (0) 7 86 43 24 22
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Mon Jun 18 23:32:01 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Mon, 18 Jun 2018 21:32:01 +0000 (UTC)
Subject: [otusers] Correlation coefficients  FORM
InReplyTo:
References:
<1851056373.661866.1527787322744@mail.yahoo.com>
MessageID: <1239341898.2345952.1529357521250@mail.yahoo.com>
Hi Anita,
I missed the fact that OT provides now three kind of importance factors for the FORM analysis, see?http://openturns.github.io/openturns/master/user_manual/_generated/openturns.FORMResult.html?highlight=formresult#openturns.FORMResult.getImportanceFactors
Depending on the kind of importance factors, you have to be cautious when you interpret them in terms of contributions of physical random variables to the probability of failure. It is basically a variance decomposition of a linearized approximation Z of the safety margin Y in the standard space, so its meaning is clear in the standard space where the standard variables are uncorrelated (and even independent if the standard space is Gaussian): it allows to rank the effect of U_1,...,U_d on the variance of Z=L(U_1,...,U_d). But if the physical random variables X_1,...,X_d are dependent, in general U_i and U_j are functions of the whole set of physical random variables. If U_1=T_1(X_1,...,X_d) contributes to 10% of the variance of Z, U_2=T_2(X_1,...,X_d) contributes to 20% of the variance of Z and so on, how can you deduce from these values the contribution of X_1?
I am not a specialist of these analyses, but from my point of view, either you introduce higher order importance factors to quantify the joint effect of dependent physical space variables or you aggregate the importance factors by independent sets of variables.
I hope I made things clearer with this explanation ;)
R?gis LEBRUN
Le lundi 18 juin 2018 ? 16:01:47 UTC+2, Anita Laera a ?crit :
Hi Regis,thank you for your explanation.I have one more question based on your answer. You wrote that "the importance factors in standard space have no immediate meaning in the case of dependent inputs" what do you mean with this?
Thank you in advance!
Kind regards,
Anita
On Thu, May 31, 2018 at 7:22 PM, regis lebrun wrote:
Hi Anita,
As the computations are done in the standard space, the standard limit state function is the composition of the physical space function (f(x,y)=x+y) and the inverse isoprobabilistic transformation. As your input distribution is Gaussian (Gaussian marginals and Gaussian copula), this transformation is linear, hence the standard limit state function is linear and the finite difference gradient is exact (no approximation).
The isoprobabilistic transformation used in OpenTURNS is based on the Cholesky factor of the covariance matrix of the standard representative of the copula, which is somewhat arbitrary as explained in?https://www.sciencedirect. com/science/article/pii/ S0266892009000307?or in?https://tel.archives ouvertes.fr/tel00913510?( title in French but content in English), Chapter 5, Section 4.
This transformation corresponds to the identity function if the correlation is zero (independence in the Gaussian copula case) and to a linear transformation in which u_1 depends only on x and u_2 on both x and y, where u_1 and u_2 are the standard space coordinates. It corresponds to a choice of conditioning order of the corresponding Rosenblatt transformation. As a result, the standard space design point is not on the first diagonal, which has no influence on the reliability index and the FORM approximation (which is exact here) of the event probability. IMO the importance factors in standard space have no immediate meaning in the case of dependent inputs.
I join a script to illustrate the case.
Best regards
R?gis
Le jeudi 31 mai 2018 ? 10:26:41 UTC+2, Anita Laera a ?crit :
Hi,
I want to correctly use the correlation coefficients in the FORM analysis I am performing using AbdoRackwitz algorithm.
To study their effect, I have considered an elementary case with two variables both normally distributed with mean equal to 0 and standard deviation equal to 1.
In this way, if not correlated, they are transformed to two variables with mean equal to 0 and standard deviation equal to 1 in the standard space.
The limit state function is of the type y = variable_1 + variable_2 and the threshold is set to 10.
This is an extremely simple case with the only purpose of understanding how the correlation works.
I have set the gradient step size equal to 1 for both variables and I am using a centered finite difference gradient.
In the case of independent variables, starting from the mean point (0, 0), 4 evaluations are performed to compute the gradient:
1  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
2  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
3  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
4  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
The first point of the line search is in (5, 5) (for both physical and standard space). I can determine this based on the gradient [1, 1] and on the value of lambda equal to 5.
If I correlate the two variables by specifying a CorrelationMatrix with coefficient of correlation equal to 0.5 and assigned a NormalCopula to the correlation matrix, I obtain (after the calculation in the mean point):
1  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735 (standard space), y = 1
2  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735 (standard space), y = 1
3  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547 (standard space), y = 1
4  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547 (standard space), y = 1
The first point of the line search is in (5, 5) for the physical space, corresponding to (5, 2.8867) in the standard space.
I can't determine how the gradient, and then the first point for the line search, is calculated.
Could you please help me with this?

Anita Laera, Researcher
Plaxis bv  Competence Centre GeoEngineering
P.O. Box 572  ?2600 AN Delft  The Netherlands
Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
Follow us:?______________________________ _________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/ listinfo/users

Anita Laera, Researcher
Plaxis bv  Competence Centre GeoEngineering
P.O. Box 572  ?2600 AN Delft  The Netherlands
Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
Follow us:?
 next part 
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Tue Jun 19 10:39:47 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Tue, 19 Jun 2018 08:39:47 +0000 (UTC)
Subject: [otusers] Grouped Sobol indices
InReplyTo: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
References: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID: <539860320.2591910.1529397587832@mail.yahoo.com>
Hi Michael,
Nice to see that your email is back ;)
Concerning your first point and a part of your postscriptum, an idea could be to provide a kind of regular expression based filter to compute the indices you want. Given a set of input variables, you may want to collect all the coefficients involving each of the variables within this set with a positive exponent, or all the coefficients involving at least one of these variables with a positive exponent, or at least all these variables with a positive exponent, or all the coefficients involving none of these variables with a positive exponent and so on. And you may want to collect these coefficients output component by output component, or for a given set of output component, or... You see what I mean? At one point we have to bound the number of methods, so a generic extraction mechanism and a dedicated set of filters may be the most efficient way to go. Do you have a list of indices of interest, with their formal definition in terms of conditional expectation? It would help to see how to implement this method.
Concerning the estimation of group indices by sampling, as soon as you are able to express them in terms of variance of conditional expectations, it is quite straightforward to implement a scheme similar to the Saltelli method. The main difficulties are the potentially large number of indices to compute, and the huge number of simulations required to sample conditional expectations with a large conditioning dimension.
For the last point, there is currently no way to inspect a given multivariate distribution to see how to factor it into smaller pieces. The point of view in OpenTURNS is the opposite: you can build such a product multivariate distribution using the ComposedCopula class (each subcopula describes the dependence within a group of dependent variables), but there is no easy way to perform the inverse computation. From a C++ perspective, you can ask for the copula of your distribution and try to dynamic_cast it into a ComposedCopula to get the associated ComposedCopula, but if it is the case, odds are large that you could have access to this information by looking at your Python script a few lines above!Nevertheless, if you really need this kind of service, it can be implemented quite easily using Csiszar divergences. In the following script, I use the (squared) Hellinger divergence to check if a given distribution is a product of two lower dimensional distributions at a given position. The computation of the divergence is done by sampling (Monte Carlo). If you have *exact* independence, the sampling size can be very low (less than 100) as the divergence is *exactly* zero and the kernel function drops to nearly zero at each point of the sample. From this script, it is straightforward to get the associated block distributions.
import openturns as otimport numpy as npfrom time import time
def isProduct(distribution, cut, N = 10000, epsilon = 1.0e16):? ? dim = distribution.getDimension()? ? distribution1 = distribution.getMarginal([i for i in range(cut)])? ? distribution2 = distribution.getMarginal([cut+i for i in range(dimcut)])? ? def kernel(x):? ? ? ? x = np.array(x)? ? ? ? s = x.shape? ? ? ? x1 = x[:, 0:cut]? ? ? ? pdf1 = np.array(distribution1.computePDF(x1))? ? ? ? x2 = x[:, cut:dim]? ? ? ? pdf2 = np.array(distribution2.computePDF(x2))? ? ? ? pdf = np.array(distribution.computePDF(x))? ? ? ? return ((1.0  np.sqrt(pdf1 * pdf2 / pdf))**2 * pdf).reshape(s[0], 1)
? ? value = ot.PythonFunction(dim, 1, func_sample=kernel)(distribution.getSample(N)).computeMean()[0]? ? return (value < epsilon)
def decompose(distribution, N = 10000, epsilon = 1.0e16):? ? dim = distribution.getDimension()? ? blocks = list()? ? currentBlock = [0]? ? for i in range(1, dim1):? ? ? ? if isProduct(distribution, i, N, epsilon):? ? ? ? ? ? blocks.append(currentBlock)? ? ? ? ? ? currentBlock = [i]? ? ? ? else:? ? ? ? ? ? currentBlock.append(i)? ? currentBlock.append(dim1)? ? blocks.append(currentBlock)? ? return blocks
if __name__ == "__main__":? ? d1 = 2? ? d2 = 1? ? d3 = 4? ? dimension = d1 + d2 + d3? ? R = ot.CorrelationMatrix(dimension)? ? for i in range(d1):? ? ? ? for j in range(i):? ? ? ? ? ? R[i, j] = 0.1 / (1 + i + j)? ? for i in range(d2):? ? ? ? for j in range(i):? ? ? ? ? ? R[i + d1, j + d1] = 0.1 / (1 + i + j)? ? for i in range(d3):? ? ? ? for j in range(i):? ? ? ? ? ? R[i + d1 + d2, j + d1 + d2] = 0.1 / (1 + i + j)? ? print(R)
? ? t0 = time()? ? print("Test 1: Normal distribution")? ? distribution = ot.Normal([0.0]*dimension, [1.0]*dimension, R)? ? print("blocks=", decompose(distribution))? ? print("Test 2: Composed copula")? ? distribution = ot.ComposedCopula([ot.ClaytonCopula(5.0)]*5 + [ot.NormalCopula(R)])? ? print("blocks=", decompose(distribution))? ? ? ? ??? ? print("t=", time()  t0, "s")
Cheers
R?gis LEBRUN
Le lundi 18 juin 2018 ? 16:53:20 UTC+2, BAUDIN Michael a ?crit :
Hi !
?
I have a computer code with dependent input vector and I would like to perform sensitivity analysis on the vector output. To do this, I would like to estimate the Sobol? indices. In order to workaround the dependent inputs, I would like to gather dependent input variables into independent groups and to estimate the Sobol? indices on these groups.
?
?????????My first idea is to use a chaos expansion in order to estimate Sobol? indices. It is easy to estimate the first order Sobol? indices with the getSobolGroupedIndex method of the FunctionnalChaosSobolIndices class:
?
http://openturns.github.io/openturns/master/user_manual/response_surface/_generated/openturns.FunctionalChaosSobolIndices.html
?
However, the corresponding total order indices method seem to be unavailable: there is no getSobolGroupedTotalIndex ?
?
If so, this is a pity, since this is just another ?simple? arrangement of the coefficients from the chaos expansion. It would allow to estimate the total effect of a group. Compared to the group Sobol first indice, it would allow to see if there are interactions with this group and other variables outside from the group. Also, if the group Sobol total indice is close to zero, this means that this group has no effect of the variability of the output.
?
?????????The second topic of my post is the SobolIndicesAlgorithm class :
?
http://openturns.github.io/openturns/master/user_manual/_generated/openturns.SobolIndicesAlgorithm.html
?
I can see that there is no ?group? method here. Is there a theoretical way of computing grouped Sobol? indices with these estimators?
?
?????????Finally, I would like to know if there is a way of using the joint distribution in order to generate the independent groups of dependent input variables? In other words, with a given multivariate joint distribution, is there a way of generating a list of sublists of indices such that:
o??Each sublist contain dependent variables,
o??Two sublists are independent.
With such a goal, what classes / methods to use ?
?
Best regards,
?
Micha?l
?
PS
By the way, the total Sobol? indices of a group of variables lead to a way of removing input variables from the model. Indeed, we could compute the largest group having a total Sobol? indice lower than a given small threshold (says 0.01 for example). By design, all variables from this group could be replaced by fixed inputs without changing the variability of the output. Furthermore, if we had the distribution of this estimator, we could guarantee this property with, say, 95% confidence (i.e. including the variability from the estimate).
In order to compute this group, the variables could first be ordered by decreasing total Sobol? indices. Then, we could add the variables into the group until the total Sobol? indice exceeds the threshold: the final group is the one just before this step.
With this raw algorithm, the chaos expansion has a great advantage: given that the decomposition is known, the estimate is almost CPUfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From roy at cerfacs.fr Wed Jun 20 15:11:53 2018
From: roy at cerfacs.fr (roy)
Date: Wed, 20 Jun 2018 15:11:53 +0200
Subject: [otusers] Sobol indices with Saltelli2010 and Sobol sequence
InReplyTo: <1037228354.295337.1529498649475@mail.yahoo.com>
References:
<1180416353.2314830.1529356139055@mail.yahoo.com>
<1037228354.295337.1529498649475@mail.yahoo.com>
MessageID:
Hi Regis,
In the paper from Saltelli2010 (Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index), there is a clear statement about this.
(In this paper, they also showed a better convergence of the estimator as opposed to Jansen, so Saltelli2002).
We can also see more proof in Sobol2005 (On global sensitivity analysis of quasiMonte Carlo algorithms).
One thing to note. The recommended way (I do not have a ref., but from Kucherenko at the SAMO UQ school) to create A and B with Sobol' sequences is to create a unique sample
of size (n_samples, n_dim * 2) and then split vertically as I showed in my example. But if you do this, you will only be able to go to dim = 20.
I don?t know if there are ref. about the maximal acceptable dimension for Sobol sequences. It will highly depend on the quality of the Sobol generator. Broda seem
to be recommended and offers dim <= 51.
For higher dimensions, it is clear that LHS would be the way to go as known to converge quickly than crude MC.
Cheers,
Pamphile
> Le 20 juin 2018 ? 14:44, regis lebrun a ?crit :
>
> Hi Pamphile,
>
> Do you have a reference on the use of Sobol sequences to compute Sobol indices? Does the better convergence property still hold in large dimension?
> In order to change the default behaviour, we need a reference stating that the different estimators still converge when using low discrepancy sequences, and that there is a gain in using them. In this case, as the Sobol sequences are limited to dimension less or equal to 40 in OT, I propose to use them up to dimension 40, then to fallback to LHS for higher dimension (if we have a reference on the convergence of LHS based estimates) or to Monte Carlo.
>
> Cheers
>
> R?gis
>
>
>
> Le mercredi 20 juin 2018 ? 09:20:20 UTC+2, roy a ?crit :
>
>
> Hi Regis,
>
> Thank you for these input.
>
> I didn?t know there was a method to randomize the Sobol? sequence in OT.
> This should be the default behaviour for computing the indices as this is known to converge faster. Or at least an option to do it directly would be handy.
>
> Sincerely,
>
> Pamphile ROY
> PhD candidate in Uncertainty Quantification
> CERFACS?Toulouse (31)?France
> +33 (0) 5 61 19 31 57
> +33 (0) 7 86 43 24 22
>
>
>
>> Le 18 juin 2018 ? 23:08, regis lebrun a ?crit :
>>
>> Hi Pamphile,
>>
>> I don't know what are the differences between Saltelli 2002 and Saltelli 2010 as it is not my main field of interest, but OpenTURNS proposes alternative sampling algorithms to compute Sobol indices (first and second order).
>> You are not forced to use a Monte Carlo sampling, you can use any weighted experiment with uniform weights, including LHS experiment and low discrepancy experiments. It is demonstrated in the following script:
>>
>> ===== BEGIN =====
>> from openturns import *
>>
>> mode = "QMC"
>> size = 10000
>>
>> # Toy model
>> model = SymbolicFunction(["x0", "x1", "x2", "x3"], ["x0+x1+x2+x3+x1*x2"])
>>
>> # Here you can use any multivariate distribution with independent copula
>> distribution = Normal(4)
>> if mode == "QMC":
>> sampling_doe = LowDiscrepancyExperiment(SobolSequence(4), distribution, size, False)
>> sampling_doe.setRandomize(True) # If set to False, the results are wrong
>> sampling_doe.setRestart(False) # or True
>> elif mode == "LHS":
>> sampling_doe = LHSExperiment(distribution, size)
>> sampling_doe.setAlwaysShuffle(True) # If set to False, the results are wrong
>> sampling_doe.setRandomShift(False) # or True
>> else:
>> sampling_doe = MonteCarloExperiment(distribution, size)
>> sobol_doe = SobolIndicesExperiment(sampling_doe, True)
>> inputDesign = sobol_doe.generate()
>> outputDesign = model(inputDesign)
>>
>> # Example of use with the different Sobol algorithms
>> Log.Show(Log.NONE)
>> algo = JansenSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Jansen")
>> print("First order=", algo.getFirstOrderIndices())
>> print("Second order=", algo.getSecondOrderIndices())
>> algo = MartinezSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Martinez")
>> print("First order=", algo.getFirstOrderIndices())
>> print("Second order=", algo.getSecondOrderIndices())
>> algo = MauntzKucherenkoSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("MauntzKucherenko")
>> print("First order=", algo.getFirstOrderIndices())
>> print("Second order=", algo.getSecondOrderIndices())
>> algo = SaltelliSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Saltelli")
>> print("First order=", algo.getFirstOrderIndices())
>> print("Second order=", algo.getSecondOrderIndices())
>> ===== END =====
>>
>> Note that you have to tweak a little bit the LowDiscrepancyExperiment and LHSExperiment classes to get correct results. The fact that the permutation has to be regenerated each time an LHS experiment is sampled is quite natural, but the fact that the low discrepancy sequence has to be randomly shifted is less clear to me... I have not played with the other low discrepancy sequences (Halton, Faure etc) to see if this behavior is general or not.
>>
>> Best regards,
>>
>> R?gis LEBRUN
>>
>>
>>
>> Le lundi 18 juin 2018 ? 17:54:52 UTC+2, roy a ?crit :
>>
>>
>> Hi everyone!
>>
>> From the documentation, Sobol? indices with Saltelli's formulation are computed using its 2002 formula.
>> In Saltelli2010, there is another formulation which is demonstrated to be better.
>>
>> Another point, there is the possibility to use an experiment in SobolIndicesExperiment(). But it is not possible to use Sobol? sequence here.
>> It would be great to add this possibility as it is known to converge faster than the MonteCarloExperiment(). To get A and B with Sobol? sequence,
>> we must split the matrix vertically:
>>
>> input_design = np.array(ot.SobolSequence(dim * 2).generate(size))
>> A = input_design[:, :dim]
>> B = input_design[:, dim:]
>>
>> Another possibility is to use Sobol? scrambled and split horizontally. But from what I know, this sampler is not available in OT?
>>
>> From the documentation, it is not really clear that the matrices are stacked as [A, B, A_B, B_A]. I had to look at the code to really
>> understand that. Maybe this could be improved?
>>
>> Thanks for the support :)
>>
>>
>> Pamphile ROY
>> PhD candidate in Uncertainty Quantification
>> CERFACS??Toulouse (31)?France
>> +33 (0) 5 61 19 31 57
>> +33 (0) 7 86 43 24 22
>>
>> _______________________________________________
>> OpenTURNS users mailing list
>> users at openturns.org
>> http://openturns.org/mailman/listinfo/users
>
From aaroubos at live.nl Thu May 31 10:45:19 2018
From: aaroubos at live.nl (Alfred Roubos)
Date: Thu, 31 May 2018 08:45:19 0000
Subject: [otusers] Objective function and exit conditions AbdoRackwitz
algorithm
MessageID:
Dear All,
I have two questions:
Firstly, about the objective function used in the AbdoRackwitz algorithm. In the original paper of (Abdo, Rackwitz 1991) the objective function was f(u)= IIull^2 subject to g(u). However, in other references f(u)=1/2 IIull^2 was used. Which objective function is implemented in the AbdoRackwitz algorithm?
Secondly, were can I find the theoretical background or additional information with regard to implementation the exit conditions of the line search procedure? I could not find this in the OpenTURNS manual?
Regards,
Alfred
 next part 
An HTML attachment was scrubbed...
URL:
From A.Laera at plaxis.nl Mon Jun 18 16:01:47 2018
From: A.Laera at plaxis.nl (Anita Laera)
Date: Mon, 18 Jun 2018 14:01:47 0000
Subject: [otusers] Correlation coefficients  FORM
InReplyTo: <1851056373.661866.1527787322744@mail.yahoo.com>
References:
<1851056373.661866.1527787322744@mail.yahoo.com>
MessageID:
Hi Regis,
thank you for your explanation.
I have one more question based on your answer. You wrote that "the
importance factors in standard space have no immediate meaning in the case
of dependent inputs" what do you mean with this?
Thank you in advance!
Kind regards,
Anita
On Thu, May 31, 2018 at 7:22 PM, regis lebrun <
regis_anne.lebrun_dutfoy at yahoo.fr> wrote:
> Hi Anita,
>
> As the computations are done in the standard space, the standard limit
> state function is the composition of the physical space function
> (f(x,y)=x+y) and the inverse isoprobabilistic transformation. As your input
> distribution is Gaussian (Gaussian marginals and Gaussian copula), this
> transformation is linear, hence the standard limit state function is linear
> and the finite difference gradient is exact (no approximation).
>
> The isoprobabilistic transformation used in OpenTURNS is based on the
> Cholesky factor of the covariance matrix of the standard representative of
> the copula, which is somewhat arbitrary as explained in
> https://www.sciencedirect.com/science/article/pii/S0266892009000307 or in
> https://tel.archivesouvertes.fr/tel00913510 (title in French but
> content in English), Chapter 5, Section 4.
>
> This transformation corresponds to the identity function if the
> correlation is zero (independence in the Gaussian copula case) and to a
> linear transformation in which u_1 depends only on x and u_2 on both x and
> y, where u_1 and u_2 are the standard space coordinates. It corresponds to
> a choice of conditioning order of the corresponding Rosenblatt
> transformation. As a result, the standard space design point is not on the
> first diagonal, which has no influence on the reliability index and the
> FORM approximation (which is exact here) of the event probability. IMO the
> importance factors in standard space have no immediate meaning in the case
> of dependent inputs.
>
> I join a script to illustrate the case.
>
> Best regards
>
> R?gis
>
>
>
>
>
>
>
> Le jeudi 31 mai 2018 ? 10:26:41 UTC+2, Anita Laera a
> ?crit :
>
>
> Hi,
> I want to correctly use the correlation coefficients in the FORM analysis
> I am performing using AbdoRackwitz algorithm.
>
> To study their effect, I have considered an elementary case with two
> variables both normally distributed with mean equal to 0 and standard
> deviation equal to 1.
> In this way, if not correlated, they are transformed to two variables with
> mean equal to 0 and standard deviation equal to 1 in the standard space.
>
> The limit state function is of the type y = variable_1 + variable_2 and
> the threshold is set to 10.
>
> This is an extremely simple case with the only purpose of understanding
> how the correlation works.
>
> I have set the gradient step size equal to 1 for both variables and I am
> using a centered finite difference gradient.
>
> In the case of independent variables, starting from the mean point (0, 0),
> 4 evaluations are performed to compute the gradient:
>
> 1  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
> 2  var_1 = 1, var_2 = 0 (both in physical and standard space), y = 1
> 3  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
> 4  var_1 = 0, var_2 = 1 (both in physical and standard space), y = 1
>
> The first point of the line search is in (5, 5) (for both physical and
> standard space). I can determine this based on the gradient [1, 1] and on
> the value of lambda equal to 5.
>
> If I correlate the two variables by specifying a CorrelationMatrix with
> coefficient of correlation equal to 0.5 and assigned a NormalCopula to the
> correlation matrix, I obtain (after the calculation in the mean point):
>
> 1  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735
> (standard space), y = 1
> 2  var_1 = 1, var_2 = 0 (physical space), var_1 = 1 var_2 = 0.57735
> (standard space), y = 1
> 3  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547
> (standard space), y = 1
> 4  var_1 = 0, var_2 = 1 (physical space), var_1 = 0 var_2 = 1.1547
> (standard space), y = 1
>
> The first point of the line search is in (5, 5) for the physical space,
> corresponding to (5, 2.8867) in the standard space.
>
> I can't determine how the gradient, and then the first point for the line
> search, is calculated.
>
> Could you please help me with this?
>
> 
>
> *Anita Laera*, *Researcher*
> [image: Plaxis:]
>
> Plaxis bv  Competence Centre GeoEngineering
> P.O. Box 572  2600 AN Delft  The Netherlands
> Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
>
>
>
>
>
> Follow us: [image: Facebook:] [image:
> Twitter:] [image: LinkedIn:]
>
> _______________________________________________
> OpenTURNS users mailing list
> users at openturns.org
> http://openturns.org/mailman/listinfo/users
>

*Anita Laera*, *Researcher*
[image: Plaxis:]
Plaxis bv  Competence Centre GeoEngineering
P.O. Box 572  2600 AN Delft  The Netherlands
Tel: +31 (0)15 251 7720  Fax: +31 (0)15 2573 107
Follow us: [image: Facebook:] [image:
Twitter:] [image: LinkedIn:]
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Tue Jul 3 17:49:27 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Tue, 3 Jul 2018 15:49:27 +0000
Subject: [otusers] Grouped Sobol indices
InReplyTo: <539860320.2591910.1529397587832@mail.yahoo.com>
References: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
<539860320.2591910.1529397587832@mail.yahoo.com>
MessageID: <696bb0dcdfe74d63a91e8eaad721acc7@PCYINTPEXMU004.NEOPROD.EDF.FR>
Hi R?gis,
Indeed, my mail is back, but not the data? yet. Hence, I would be happy to show a basic Python implementation of the total group Sobol? indice, but the most efficient way is to get a template script ? which is in the encrypted hard drive of the failed computer. ? This should be solved within a couple of days, I hope.
Indeed a generic regular expression engine could to the trick, but it is much more complicated than required, I think. After all, here is all the choices we have :
? First or total indice
? By variable or by group
This generates only 4 indices that can be required, to my knowledge :
? first order indice by variable
? total order indice by variable
? first order indice by group
? total order indice by group
and this is it.
In attachment, I put three files in order to show a basic test case for what I would like to do
? cruegeneratewithdependency.py : generates a sample with 8 variables in input and 1 variable in output
? crue8varcopula.csv
? chaosbygroup.py : creates a chaos from the sample and explores the indices from it.
This last script ends with the lines :
# Groups of variables (known)
allgroups = [[0],[1],[2],[3,4,5],[6,7]]
# Create a functional chaos model
algo = ot.FunctionalChaosAlgorithm(x, y)
print(algo.getAdaptiveStrategy())
print(algo.getProjectionStrategy())
algo.run()
result = algo.getResult()
fccr = ot.FunctionalChaosRandomVector(result)
for group in allgroups:
s = fccr.getSobolGroupedIndex(group)
# TODO : get the total order indice of each group
print("Group=%s, S=%.2f" % (str(group),s))
The script I have in my hard drive allow to loop over the multiindices, computing the required indices within the loop : I will complete my message when possible. Meanwhile, I think that there is an issue within the API since it does not seem possible to get the enumeration rule from the functional chaos ?algo? : am I wrong ?
Your analysis of the estimate of these grouped indices by sampling make it clear that this is an advantage of the chaos : estimating the group indices is much easier with chaos than by sampling.
Thank you very much with the copula decomposition script : I think that I can use almost as is !
Best regards,
Micha?l
De : regis_anne.lebrun_dutfoy at yahoo.fr [mailto:regis_anne.lebrun_dutfoy at yahoo.fr]
Envoy? : mardi 19 juin 2018 10:40
? : users at openturns.org; BAUDIN Michael
Objet : Re: [otusers] Grouped Sobol indices
Hi Michael,
Nice to see that your email is back ;)
Concerning your first point and a part of your postscriptum, an idea could be to provide a kind of regular expression based filter to compute the indices you want. Given a set of input variables, you may want to collect all the coefficients involving each of the variables within this set with a positive exponent, or all the coefficients involving at least one of these variables with a positive exponent, or at least all these variables with a positive exponent, or all the coefficients involving none of these variables with a positive exponent and so on. And you may want to collect these coefficients output component by output component, or for a given set of output component, or... You see what I mean? At one point we have to bound the number of methods, so a generic extraction mechanism and a dedicated set of filters may be the most efficient way to go. Do you have a list of indices of interest, with their formal definition in terms of conditional expectation? It would help to see how to implement this method.
Concerning the estimation of group indices by sampling, as soon as you are able to express them in terms of variance of conditional expectations, it is quite straightforward to implement a scheme similar to the Saltelli method. The main difficulties are the potentially large number of indices to compute, and the huge number of simulations required to sample conditional expectations with a large conditioning dimension.
For the last point, there is currently no way to inspect a given multivariate distribution to see how to factor it into smaller pieces. The point of view in OpenTURNS is the opposite: you can build such a product multivariate distribution using the ComposedCopula class (each subcopula describes the dependence within a group of dependent variables), but there is no easy way to perform the inverse computation. From a C++ perspective, you can ask for the copula of your distribution and try to dynamic_cast it into a ComposedCopula to get the associated ComposedCopula, but if it is the case, odds are large that you could have access to this information by looking at your Python script a few lines above!
Nevertheless, if you really need this kind of service, it can be implemented quite easily using Csiszar divergences. In the following script, I use the (squared) Hellinger divergence to check if a given distribution is a product of two lower dimensional distributions at a given position. The computation of the divergence is done by sampling (Monte Carlo). If you have *exact* independence, the sampling size can be very low (less than 100) as the divergence is *exactly* zero and the kernel function drops to nearly zero at each point of the sample. From this script, it is straightforward to get the associated block distributions.
import openturns as ot
import numpy as np
from time import time
def isProduct(distribution, cut, N = 10000, epsilon = 1.0e16):
dim = distribution.getDimension()
distribution1 = distribution.getMarginal([i for i in range(cut)])
distribution2 = distribution.getMarginal([cut+i for i in range(dimcut)])
def kernel(x):
x = np.array(x)
s = x.shape
x1 = x[:, 0:cut]
pdf1 = np.array(distribution1.computePDF(x1))
x2 = x[:, cut:dim]
pdf2 = np.array(distribution2.computePDF(x2))
pdf = np.array(distribution.computePDF(x))
return ((1.0  np.sqrt(pdf1 * pdf2 / pdf))**2 * pdf).reshape(s[0], 1)
value = ot.PythonFunction(dim, 1, func_sample=kernel)(distribution.getSample(N)).computeMean()[0]
return (value < epsilon)
def decompose(distribution, N = 10000, epsilon = 1.0e16):
dim = distribution.getDimension()
blocks = list()
currentBlock = [0]
for i in range(1, dim1):
if isProduct(distribution, i, N, epsilon):
blocks.append(currentBlock)
currentBlock = [i]
else:
currentBlock.append(i)
currentBlock.append(dim1)
blocks.append(currentBlock)
return blocks
if __name__ == "__main__":
d1 = 2
d2 = 1
d3 = 4
dimension = d1 + d2 + d3
R = ot.CorrelationMatrix(dimension)
for i in range(d1):
for j in range(i):
R[i, j] = 0.1 / (1 + i + j)
for i in range(d2):
for j in range(i):
R[i + d1, j + d1] = 0.1 / (1 + i + j)
for i in range(d3):
for j in range(i):
R[i + d1 + d2, j + d1 + d2] = 0.1 / (1 + i + j)
print(R)
t0 = time()
print("Test 1: Normal distribution")
distribution = ot.Normal([0.0]*dimension, [1.0]*dimension, R)
print("blocks=", decompose(distribution))
print("Test 2: Composed copula")
distribution = ot.ComposedCopula([ot.ClaytonCopula(5.0)]*5 + [ot.NormalCopula(R)])
print("blocks=", decompose(distribution))
print("t=", time()  t0, "s")
Cheers
R?gis LEBRUN
Le lundi 18 juin 2018 ? 16:53:20 UTC+2, BAUDIN Michael > a ?crit :
Hi !
I have a computer code with dependent input vector and I would like to perform sensitivity analysis on the vector output. To do this, I would like to estimate the Sobol? indices. In order to workaround the dependent inputs, I would like to gather dependent input variables into independent groups and to estimate the Sobol? indices on these groups.
? My first idea is to use a chaos expansion in order to estimate Sobol? indices. It is easy to estimate the first order Sobol? indices with the getSobolGroupedIndex method of the FunctionnalChaosSobolIndices class:
http://openturns.github.io/openturns/master/user_manual/response_surface/_generated/openturns.FunctionalChaosSobolIndices.html
However, the corresponding total order indices method seem to be unavailable: there is no getSobolGroupedTotalIndex ?
If so, this is a pity, since this is just another ?simple? arrangement of the coefficients from the chaos expansion. It would allow to estimate the total effect of a group. Compared to the group Sobol first indice, it would allow to see if there are interactions with this group and other variables outside from the group. Also, if the group Sobol total indice is close to zero, this means that this group has no effect of the variability of the output.
? The second topic of my post is the SobolIndicesAlgorithm class :
http://openturns.github.io/openturns/master/user_manual/_generated/openturns.SobolIndicesAlgorithm.html
I can see that there is no ?group? method here. Is there a theoretical way of computing grouped Sobol? indices with these estimators?
? Finally, I would like to know if there is a way of using the joint distribution in order to generate the independent groups of dependent input variables? In other words, with a given multivariate joint distribution, is there a way of generating a list of sublists of indices such that:
o Each sublist contain dependent variables,
o Two sublists are independent.
With such a goal, what classes / methods to use ?
Best regards,
Micha?l
PS
By the way, the total Sobol? indices of a group of variables lead to a way of removing input variables from the model. Indeed, we could compute the largest group having a total Sobol? indice lower than a given small threshold (says 0.01 for example). By design, all variables from this group could be replaced by fixed inputs without changing the variability of the output. Furthermore, if we had the distribution of this estimator, we could guarantee this property with, say, 95% confidence (i.e. including the variability from the estimate).
In order to compute this group, the variables could first be ordered by decreasing total Sobol? indices. Then, we could add the variables into the group until the total Sobol? indice exceeds the threshold: the final group is the one just before this step.
With this raw algorithm, the chaos expansion has a great advantage: given that the decomposition is known, the estimate is almost CPUfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
 next part 
A nontext attachment was scrubbed...
Name: cruegeneratewithdependency.py
Type: application/octetstream
Size: 1762 bytes
Desc: cruegeneratewithdependency.py
URL:
 next part 
A nontext attachment was scrubbed...
Name: crue8varcopula.csv
Type: application/octetstream
Size: 218042 bytes
Desc: crue8varcopula.csv
URL:
 next part 
A nontext attachment was scrubbed...
Name: chaosbygroup.py
Type: application/octetstream
Size: 784 bytes
Desc: chaosbygroup.py
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Tue Jul 3 18:22:51 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Tue, 3 Jul 2018 16:22:51 +0000 (UTC)
Subject: [otusers] Grouped Sobol indices
InReplyTo: <696bb0dcdfe74d63a91e8eaad721acc7@PCYINTPEXMU004.NEOPROD.EDF.FR>
References: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
<539860320.2591910.1529397587832@mail.yahoo.com>
<696bb0dcdfe74d63a91e8eaad721acc7@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID: <726968440.2173702.1530634971380@mail.yahoo.com>
Hi Michael,
You may also want to combine the contribution of a group of input variables on a group of output variables, eg when the output is the vector of coefficients of a Karhunen Loeve expansion... At the end it produces a lot of combinations!It may also be interesting to produce the conditional expectations as functions as a postprocessing of a chaos expansion. Your opinion on this point?
Cheers
R?gis
Le mardi 3 juillet 2018 ? 17:49:31 UTC+2, BAUDIN Michael a ?crit :
Hi R?gis,
?
Indeed, my mail is back, but not the data? yet. Hence, I would be happy to show a basic Python implementation of the total group Sobol? indice, but the most efficient way is to get a template script ? which is in the encrypted hard drive of the failed computer.L This should be solved within a couple of days, I hope.
?
Indeed a generic regular expression engine could to the trick, but it is much more complicated than required, I think. After all, here is all the choices we have :
?????????First or total indice
?????????By variable or by group
This generates only 4 indices that can be required, to my knowledge :
?????????first order indice by variable
?????????total order indice by variable
?????????first order indice by group
?????????total order indice by group
and this is it.
?
In attachment, I put three files in order to show a basic test case for what I would like to do
?????????cruegeneratewithdependency.py : generates a sample with 8 variables in input and 1 variable in output
?????????crue8varcopula.csv
?????????chaosbygroup.py : creates a chaos from the sample and explores the indices from it.
This last script ends with the lines :
?
# Groups of variables (known)
allgroups = [[0],[1],[2],[3,4,5],[6,7]]
# Create a functional chaos model
algo = ot.FunctionalChaosAlgorithm(x, y)
print(algo.getAdaptiveStrategy())
print(algo.getProjectionStrategy())
algo.run()
result = algo.getResult()
fccr = ot.FunctionalChaosRandomVector(result)
for group in allgroups:
??? s = fccr.getSobolGroupedIndex(group)
??? # TODO : get the total order indice of each group
??? print("Group=%s, S=%.2f" % (str(group),s))
?
?
The script I have in my hard drive allow to loop over the multiindices, computing the required indices within the loop : I will complete my message when possible. Meanwhile, I think that there is an issue within the API since it does not seem possible to get the enumeration rule from the functional chaos ?algo? : am I wrong ?
?
Your analysis of the estimate of these grouped indices by sampling make it clear that this is an advantage of the chaos : estimating the group indices is much easier with chaos than by sampling.
?
Thank you very much with the copula decomposition script : I think that I can use almost as is !
?
Best regards,
?
Micha?l
?
?
De?: regis_anne.lebrun_dutfoy at yahoo.fr [mailto:regis_anne.lebrun_dutfoy at yahoo.fr]
Envoy??: mardi 19 juin 2018 10:40
??: users at openturns.org; BAUDIN Michael
Objet?: Re: [otusers] Grouped Sobol indices
?
Hi Michael,
?
Nice to see that your email is back ;)
?
Concerning your first point and a part of your postscriptum, an idea could be to provide a kind of regular expression based filter to compute the indices you want. Given a set of input variables, you may want to collect all the coefficients involving each of the variables within this set with a positive exponent, or all the coefficients involving at least one of these variables with a positive exponent, or at least all these variables with a positive exponent, or all the coefficients involving none of these variables with a positive exponent and so on. And you may want to collect these coefficients output component by output component, or for a given set of output component, or... You see what I mean? At one point we have to bound the number of methods, so a generic extraction mechanism and a dedicated set of filters may be the most efficient way to go. Do you have a list of indices of interest, with their formal definition in terms of conditional expectation? It would help to see how to implement this method.
?
Concerning the estimation of group indices by sampling, as soon as you are able to express them in terms of variance of conditional expectations, it is quite straightforward to implement a scheme similar to the Saltelli method. The main difficulties are the potentially large number of indices to compute, and the huge number of simulations required to sample conditional expectations with a large conditioning dimension.
?
For the last point, there is currently no way to inspect a given multivariate distribution to see how to factor it into smaller pieces. The point of view in OpenTURNS is the opposite: you can build such a product multivariate distribution using the ComposedCopula class (each subcopula describes the dependence within a group of dependent variables), but there is no easy way to perform the inverse computation. From a C++ perspective, you can ask for the copula of your distribution and try to dynamic_cast it into a ComposedCopula to get the associated ComposedCopula, but if it is the case, odds are large that you could have access to this information by looking at your Python script a few lines above!
Nevertheless, if you really need this kind of service, it can be implemented quite easily using Csiszar divergences. In the following script, I use the (squared) Hellinger divergence to check if a given distribution is a product of two lower dimensional distributions at a given position. The computation of the divergence is done by sampling (Monte Carlo). If you have *exact* independence, the sampling size can be very low (less than 100) as the divergence is *exactly* zero and the kernel function drops to nearly zero at each point of the sample. From this script, it is straightforward to get the associated block distributions.
?
import openturns as ot
import numpy as np
from time import time
?
def isProduct(distribution, cut, N = 10000, epsilon = 1.0e16):
? ? dim = distribution.getDimension()
? ? distribution1 = distribution.getMarginal([i for i in range(cut)])
? ? distribution2 = distribution.getMarginal([cut+i for i in range(dimcut)])
? ? def kernel(x):
? ? ? ? x = np.array(x)
? ? ? ? s = x.shape
? ? ? ? x1 = x[:, 0:cut]
? ? ? ? pdf1 = np.array(distribution1.computePDF(x1))
? ? ? ? x2 = x[:, cut:dim]
? ? ? ? pdf2 = np.array(distribution2.computePDF(x2))
? ? ? ? pdf = np.array(distribution.computePDF(x))
? ? ? ? return ((1.0  np.sqrt(pdf1 * pdf2 / pdf))**2 * pdf).reshape(s[0], 1)
?
? ? value = ot.PythonFunction(dim, 1, func_sample=kernel)(distribution.getSample(N)).computeMean()[0]
? ? return (value < epsilon)
?
def decompose(distribution, N = 10000, epsilon = 1.0e16):
? ? dim = distribution.getDimension()
? ? blocks = list()
? ? currentBlock = [0]
? ? for i in range(1, dim1):
? ? ? ? if isProduct(distribution, i, N, epsilon):
? ? ? ? ? ? blocks.append(currentBlock)
? ? ? ? ? ? currentBlock = [i]
? ? ? ? else:
? ? ? ? ? ? currentBlock.append(i)
? ? currentBlock.append(dim1)
? ? blocks.append(currentBlock)
? ? return blocks
?
if __name__ == "__main__":
? ? d1 = 2
? ? d2 = 1
? ? d3 = 4
? ? dimension = d1 + d2 + d3
? ? R = ot.CorrelationMatrix(dimension)
? ? for i in range(d1):
? ? ? ? for j in range(i):
? ? ? ? ? ? R[i, j] = 0.1 / (1 + i + j)
? ? for i in range(d2):
? ? ? ? for j in range(i):
? ? ? ? ? ? R[i + d1, j + d1] = 0.1 / (1 + i + j)
? ? for i in range(d3):
? ? ? ? for j in range(i):
? ? ? ? ? ? R[i + d1 + d2, j + d1 + d2] = 0.1 / (1 + i + j)
? ? print(R)
?
? ? t0 = time()
? ? print("Test 1: Normal distribution")
? ? distribution = ot.Normal([0.0]*dimension, [1.0]*dimension, R)
? ? print("blocks=", decompose(distribution))
? ? print("Test 2: Composed copula")
? ? distribution = ot.ComposedCopula([ot.ClaytonCopula(5.0)]*5 + [ot.NormalCopula(R)])
? ? print("blocks=", decompose(distribution))? ? ? ? ??
? ? print("t=", time()  t0, "s")
?
?
Cheers
?
R?gis LEBRUN
?
?
?
?
Le lundi 18 juin 2018 ? 16:53:20 UTC+2, BAUDIN Michael a ?crit :
?
?
Hi !
?
I have a computer code with dependent input vector and I would like to perform sensitivity analysis on the vector output. To do this, I would like to estimate the Sobol? indices. In order to workaround the dependent inputs, I would like to gather dependent input variables into independent groups and to estimate the Sobol? indices on these groups.
?
?????????My first idea is to use a chaos expansion in order to estimate Sobol? indices. It is easy to estimate the first order Sobol? indices with the getSobolGroupedIndex method of the FunctionnalChaosSobolIndices class:
?
http://openturns.github.io/openturns/master/user_manual/response_surface/_generated/openturns.FunctionalChaosSobolIndices.html
?
However, the corresponding total order indices method seem to be unavailable: there is no getSobolGroupedTotalIndex ?
?
If so, this is a pity, since this is just another ?simple? arrangement of the coefficients from the chaos expansion. It would allow to estimate the total effect of a group. Compared to the group Sobol first indice, it would allow to see if there are interactions with this group and other variables outside from the group. Also, if the group Sobol total indice is close to zero, this means that this group has no effect of the variability of the output.
?
?????????The second topic of my post is the SobolIndicesAlgorithm class :
?
http://openturns.github.io/openturns/master/user_manual/_generated/openturns.SobolIndicesAlgorithm.html
?
I can see that there is no ?group? method here. Is there a theoretical way of computing grouped Sobol? indices with these estimators?
?
?????????Finally, I would like to know if there is a way of using the joint distribution in order to generate the independent groups of dependent input variables? In other words, with a given multivariate joint distribution, is there a way of generating a list of sublists of indices such that:
o??Each sublist contain dependent variables,
o??Two sublists are independent.
With such a goal, what classes / methods to use ?
?
Best regards,
?
Micha?l
?
PS
By the way, the total Sobol? indices of a group of variables lead to a way of removing input variables from the model. Indeed, we could compute the largest group having a total Sobol? indice lower than a given small threshold (says 0.01 for example). By design, all variables from this group could be replaced by fixed inputs without changing the variability of the output. Furthermore, if we had the distribution of this estimator, we could guarantee this property with, say, 95% confidence (i.e. including the variability from the estimate).
In order to compute this group, the variables could first be ordered by decreasing total Sobol? indices. Then, we could add the variables into the group until the total Sobol? indice exceeds the threshold: the final group is the one just before this step.
With this raw algorithm, the chaos expansion has a great advantage: given that the decomposition is known, the estimate is almost CPUfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Wed Jul 4 16:50:32 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Wed, 4 Jul 2018 14:50:32 +0000
Subject: [otusers] Grouped Sobol indices
InReplyTo: <726968440.2173702.1530634971380@mail.yahoo.com>
References: <97507e5475794c6bada051ab707ba20e@PCYINTPEXMU004.NEOPROD.EDF.FR>
<539860320.2591910.1529397587832@mail.yahoo.com>
<696bb0dcdfe74d63a91e8eaad721acc7@PCYINTPEXMU004.NEOPROD.EDF.FR>
<726968440.2173702.1530634971380@mail.yahoo.com>
MessageID: <813eac305e1f4767a1286fa75b127847@NOEINTPEXMU004.NEOPROD.EDF.FR>
Hi R?gis,
Considering a group of output variables would be interesting indeed. I cannot however clearly see how this can be done or used. Would it allow to select the variables having influence on several outputs ?
By ?produce the conditional expectations as functions?, you mean create a function which takes a group of variables as input and returns the conditional expectation given the values of the variables in the group as output ? That is, if the group is denoted by Xu, the function is E(YXu). In other words, this produces a function which averages the output Y for the variables not in the group Xu. Ok : this reduces the dimension of the function, because this function has only Xu as inputs, instead of all the input vector X. Was it your purpose ? This could be very useful, as a postprocessing of the chaos : this would combine the chaos, the sensitivity analysis step and the dimension reduction in one single step.
Best regards,
Micha?l
De : regis_anne.lebrun_dutfoy at yahoo.fr [mailto:regis_anne.lebrun_dutfoy at yahoo.fr]
Envoy? : mardi 3 juillet 2018 18:23
? : users at openturns.org; BAUDIN Michael
Objet : Re: RE: [otusers] Grouped Sobol indices
Hi Michael,
You may also want to combine the contribution of a group of input variables on a group of output variables, eg when the output is the vector of coefficients of a Karhunen Loeve expansion... At the end it produces a lot of combinations!
It may also be interesting to produce the conditional expectations as functions as a postprocessing of a chaos expansion. Your opinion on this point?
Cheers
R?gis
Le mardi 3 juillet 2018 ? 17:49:31 UTC+2, BAUDIN Michael > a ?crit :
Hi R?gis,
Indeed, my mail is back, but not the data? yet. Hence, I would be happy to show a basic Python implementation of the total group Sobol? indice, but the most efficient way is to get a template script ? which is in the encrypted hard drive of the failed computer. ? This should be solved within a couple of days, I hope.
Indeed a generic regular expression engine could to the trick, but it is much more complicated than required, I think. After all, here is all the choices we have :
? First or total indice
? By variable or by group
This generates only 4 indices that can be required, to my knowledge :
? first order indice by variable
? total order indice by variable
? first order indice by group
? total order indice by group
and this is it.
In attachment, I put three files in order to show a basic test case for what I would like to do
? cruegeneratewithdependency.py : generates a sample with 8 variables in input and 1 variable in output
? crue8varcopula.csv
? chaosbygroup.py : creates a chaos from the sample and explores the indices from it.
This last script ends with the lines :
# Groups of variables (known)
allgroups = [[0],[1],[2],[3,4,5],[6,7]]
# Create a functional chaos model
algo = ot.FunctionalChaosAlgorithm(x, y)
print(algo.getAdaptiveStrategy())
print(algo.getProjectionStrategy())
algo.run()
result = algo.getResult()
fccr = ot.FunctionalChaosRandomVector(result)
for group in allgroups:
s = fccr.getSobolGroupedIndex(group)
# TODO : get the total order indice of each group
print("Group=%s, S=%.2f" % (str(group),s))
The script I have in my hard drive allow to loop over the multiindices, computing the required indices within the loop : I will complete my message when possible. Meanwhile, I think that there is an issue within the API since it does not seem possible to get the enumeration rule from the functional chaos ?algo? : am I wrong ?
Your analysis of the estimate of these grouped indices by sampling make it clear that this is an advantage of the chaos : estimating the group indices is much easier with chaos than by sampling.
Thank you very much with the copula decomposition script : I think that I can use almost as is !
Best regards,
Micha?l
De : regis_anne.lebrun_dutfoy at yahoo.fr [mailto:regis_anne.lebrun_dutfoy at yahoo.fr]
Envoy? : mardi 19 juin 2018 10:40
? : users at openturns.org; BAUDIN Michael >
Objet : Re: [otusers] Grouped Sobol indices
Hi Michael,
Nice to see that your email is back ;)
Concerning your first point and a part of your postscriptum, an idea could be to provide a kind of regular expression based filter to compute the indices you want. Given a set of input variables, you may want to collect all the coefficients involving each of the variables within this set with a positive exponent, or all the coefficients involving at least one of these variables with a positive exponent, or at least all these variables with a positive exponent, or all the coefficients involving none of these variables with a positive exponent and so on. And you may want to collect these coefficients output component by output component, or for a given set of output component, or... You see what I mean? At one point we have to bound the number of methods, so a generic extraction mechanism and a dedicated set of filters may be the most efficient way to go. Do you have a list of indices of interest, with their formal definition in terms of conditional expectation? It would help to see how to implement this method.
Concerning the estimation of group indices by sampling, as soon as you are able to express them in terms of variance of conditional expectations, it is quite straightforward to implement a scheme similar to the Saltelli method. The main difficulties are the potentially large number of indices to compute, and the huge number of simulations required to sample conditional expectations with a large conditioning dimension.
For the last point, there is currently no way to inspect a given multivariate distribution to see how to factor it into smaller pieces. The point of view in OpenTURNS is the opposite: you can build such a product multivariate distribution using the ComposedCopula class (each subcopula describes the dependence within a group of dependent variables), but there is no easy way to perform the inverse computation. From a C++ perspective, you can ask for the copula of your distribution and try to dynamic_cast it into a ComposedCopula to get the associated ComposedCopula, but if it is the case, odds are large that you could have access to this information by looking at your Python script a few lines above!
Nevertheless, if you really need this kind of service, it can be implemented quite easily using Csiszar divergences. In the following script, I use the (squared) Hellinger divergence to check if a given distribution is a product of two lower dimensional distributions at a given position. The computation of the divergence is done by sampling (Monte Carlo). If you have *exact* independence, the sampling size can be very low (less than 100) as the divergence is *exactly* zero and the kernel function drops to nearly zero at each point of the sample. From this script, it is straightforward to get the associated block distributions.
import openturns as ot
import numpy as np
from time import time
def isProduct(distribution, cut, N = 10000, epsilon = 1.0e16):
dim = distribution.getDimension()
distribution1 = distribution.getMarginal([i for i in range(cut)])
distribution2 = distribution.getMarginal([cut+i for i in range(dimcut)])
def kernel(x):
x = np.array(x)
s = x.shape
x1 = x[:, 0:cut]
pdf1 = np.array(distribution1.computePDF(x1))
x2 = x[:, cut:dim]
pdf2 = np.array(distribution2.computePDF(x2))
pdf = np.array(distribution.computePDF(x))
return ((1.0  np.sqrt(pdf1 * pdf2 / pdf))**2 * pdf).reshape(s[0], 1)
value = ot.PythonFunction(dim, 1, func_sample=kernel)(distribution.getSample(N)).computeMean()[0]
return (value < epsilon)
def decompose(distribution, N = 10000, epsilon = 1.0e16):
dim = distribution.getDimension()
blocks = list()
currentBlock = [0]
for i in range(1, dim1):
if isProduct(distribution, i, N, epsilon):
blocks.append(currentBlock)
currentBlock = [i]
else:
currentBlock.append(i)
currentBlock.append(dim1)
blocks.append(currentBlock)
return blocks
if __name__ == "__main__":
d1 = 2
d2 = 1
d3 = 4
dimension = d1 + d2 + d3
R = ot.CorrelationMatrix(dimension)
for i in range(d1):
for j in range(i):
R[i, j] = 0.1 / (1 + i + j)
for i in range(d2):
for j in range(i):
R[i + d1, j + d1] = 0.1 / (1 + i + j)
for i in range(d3):
for j in range(i):
R[i + d1 + d2, j + d1 + d2] = 0.1 / (1 + i + j)
print(R)
t0 = time()
print("Test 1: Normal distribution")
distribution = ot.Normal([0.0]*dimension, [1.0]*dimension, R)
print("blocks=", decompose(distribution))
print("Test 2: Composed copula")
distribution = ot.ComposedCopula([ot.ClaytonCopula(5.0)]*5 + [ot.NormalCopula(R)])
print("blocks=", decompose(distribution))
print("t=", time()  t0, "s")
Cheers
R?gis LEBRUN
Le lundi 18 juin 2018 ? 16:53:20 UTC+2, BAUDIN Michael > a ?crit :
Hi !
I have a computer code with dependent input vector and I would like to perform sensitivity analysis on the vector output. To do this, I would like to estimate the Sobol? indices. In order to workaround the dependent inputs, I would like to gather dependent input variables into independent groups and to estimate the Sobol? indices on these groups.
? My first idea is to use a chaos expansion in order to estimate Sobol? indices. It is easy to estimate the first order Sobol? indices with the getSobolGroupedIndex method of the FunctionnalChaosSobolIndices class:
http://openturns.github.io/openturns/master/user_manual/response_surface/_generated/openturns.FunctionalChaosSobolIndices.html
However, the corresponding total order indices method seem to be unavailable: there is no getSobolGroupedTotalIndex ?
If so, this is a pity, since this is just another ?simple? arrangement of the coefficients from the chaos expansion. It would allow to estimate the total effect of a group. Compared to the group Sobol first indice, it would allow to see if there are interactions with this group and other variables outside from the group. Also, if the group Sobol total indice is close to zero, this means that this group has no effect of the variability of the output.
? The second topic of my post is the SobolIndicesAlgorithm class :
http://openturns.github.io/openturns/master/user_manual/_generated/openturns.SobolIndicesAlgorithm.html
I can see that there is no ?group? method here. Is there a theoretical way of computing grouped Sobol? indices with these estimators?
? Finally, I would like to know if there is a way of using the joint distribution in order to generate the independent groups of dependent input variables? In other words, with a given multivariate joint distribution, is there a way of generating a list of sublists of indices such that:
o Each sublist contain dependent variables,
o Two sublists are independent.
With such a goal, what classes / methods to use ?
Best regards,
Micha?l
PS
By the way, the total Sobol? indices of a group of variables lead to a way of removing input variables from the model. Indeed, we could compute the largest group having a total Sobol? indice lower than a given small threshold (says 0.01 for example). By design, all variables from this group could be replaced by fixed inputs without changing the variability of the output. Furthermore, if we had the distribution of this estimator, we could guarantee this property with, say, 95% confidence (i.e. including the variability from the estimate).
In order to compute this group, the variables could first be ordered by decreasing total Sobol? indices. Then, we could add the variables into the group until the total Sobol? indice exceeds the threshold: the final group is the one just before this step.
With this raw algorithm, the chaos expansion has a great advantage: given that the decomposition is known, the estimate is almost CPUfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From eric.marsden at free.fr Wed Jul 4 17:16:42 2018
From: eric.marsden at free.fr (Eric Marsden)
Date: Wed, 4 Jul 2018 17:16:42 +0200
Subject: [otusers] Availability of the Student t copula
MessageID: <31a7dabcb80a1d7b910b89e358a98093@free.fr>
Hello,
I am interested in using the Student t copula, in its standard symmetric
form (implemented as tCopula in the copula library for R). It doesn't
seem to be implemented in OpenTurns; am I missing something?
Thanks,
Eric
From regis_anne.lebrun_dutfoy at yahoo.fr Thu Jul 5 12:36:30 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Thu, 5 Jul 2018 10:36:30 +0000 (UTC)
Subject: [otusers] Availability of the Student t copula
InReplyTo: <31a7dabcb80a1d7b910b89e358a98093@free.fr>
References: <31a7dabcb80a1d7b910b89e358a98093@free.fr>
MessageID: <120274312.2977445.1530786990796@mail.yahoo.com>
Hi Eric,
The Student t copula is an elliptical copula, and as such there is no explicit formula to exploit in order to improve the speed/accuracy of a dedicated StudentCopula instead of using the generic SklarCopula applied to a multivariate Student t distribution. The same thing is true for the NormalCopula, but it appeared in OpenTURNS before the SklarCopula. So to build eg a 3D Student copula you need, you can write:
import openturns as otnu = 2.5R = ot.CorrelationMatrix(3, [1.0, 0.2, 0.3, 0.2, 1.0, 0.1, 0.3, 0.1, 1.0])mean = [0.0]*3std = [1.0]*3# First optionmyCopula1 = ot.Student(nu, mean, std, R).getCopula()# Second optionmyCopula2 = ot.SklarCopula(ot.Student(nu, mean, std, R))
Cheers
R?gis
Le jeudi 5 juillet 2018 ? 10:51:24 UTC+2, Eric Marsden a ?crit :
Hello,
I am interested in using the Student t copula, in its standard symmetric
form (implemented as tCopula in the copula library for R). It doesn't
seem to be implemented in OpenTurns; am I missing something?
Thanks,
Eric
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Thu Jul 5 18:24:52 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Thu, 5 Jul 2018 16:24:52 +0000
Subject: [otusers] Sobol indices with Saltelli2010 and Sobol sequence
InReplyTo:
References:
<1180416353.2314830.1529356139055@mail.yahoo.com>
<1037228354.295337.1529498649475@mail.yahoo.com>
MessageID: <1b9354d71548499e8ec32d48eb1b9f17@PCYINTPEXMU004.NEOPROD.EDF.FR>
Hi,
Actually, there is no theoretical reason to limit the dimension of a low discrepancy sequence. A better indicator is a "kind of" ratio of the number of points in the sample with respect to the dimension: in the end, any DOE must fill the space. Notice that the number of points in a low discrepancy sequence must be chosen depending on the properties of the sequence. The Sobol' sequence is a base2 sequence : the number of points must be a power of 2 to fill the elementary volumes. Moreover, for the Sobol' sequence, there is a minimum number of points to be used (i.e. a minimum value of the exponent). The same reasoning applies to all sequences : the discussion for Halton would make my email much larger !
These methods behave this way : if the number of points is not large enough, the performance is lower than MonteCarlo, but if the number exceeds this limit, the low discrepancy sequence outperforms MC by far (i.e. 1/n instead of 1/sqrt(n)).
In other softwares (e.g. Scilab), the Sobol' sequence goes up to dimension larger than 1000. The most important technical limitation for Sobol' is the storage of the coefficients of the polynomial associated with the generation of the Sobol' sequence : this is a precomputed table, which is embedded within the source code (in some softwares, this is in a file which is read at startup). It would be straightforward to update the OT source code in order to fix this issue: I could give the URL, but I do not have any internet at this time. Other sequences (e.g. Halton) do not have this limitation.
A last word : you have optimized LHS designs in OpenTURNS. This is much better than plain LHS, especially when the ratio number of points/dimension is hostile.
Best regards,
Micha?l
Message d'origine
De?: usersbounces at openturns.org [mailto:usersbounces at openturns.org]
Envoy??: mercredi 20 juin 2018 15:12
??: regis_anne.lebrun_dutfoy at yahoo.fr
Cc?: users at openturns.org
Objet?: Re: [otusers] Sobol indices with Saltelli2010 and Sobol sequence
Hi Regis,
In the paper from Saltelli2010 (Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index), there is a clear statement about this.
(In this paper, they also showed a better convergence of the estimator as opposed to Jansen, so Saltelli2002).
We can also see more proof in Sobol2005 (On global sensitivity analysis of quasiMonte Carlo algorithms).
One thing to note. The recommended way (I do not have a ref., but from Kucherenko at the SAMO UQ school) to create A and B with Sobol' sequences is to create a unique sample of size (n_samples, n_dim * 2) and then split vertically as I showed in my example. But if you do this, you will only be able to go to dim = 20.
I don?t know if there are ref. about the maximal acceptable dimension for Sobol sequences. It will highly depend on the quality of the Sobol generator. Broda seem to be recommended and offers dim <= 51.
For higher dimensions, it is clear that LHS would be the way to go as known to converge quickly than crude MC.
Cheers,
Pamphile
> Le 20 juin 2018 ? 14:44, regis lebrun a ?crit :
>
> Hi Pamphile,
>
> Do you have a reference on the use of Sobol sequences to compute Sobol indices? Does the better convergence property still hold in large dimension?
> In order to change the default behaviour, we need a reference stating that the different estimators still converge when using low discrepancy sequences, and that there is a gain in using them. In this case, as the Sobol sequences are limited to dimension less or equal to 40 in OT, I propose to use them up to dimension 40, then to fallback to LHS for higher dimension (if we have a reference on the convergence of LHS based estimates) or to Monte Carlo.
>
> Cheers
>
> R?gis
>
>
>
> Le mercredi 20 juin 2018 ? 09:20:20 UTC+2, roy a ?crit :
>
>
> Hi Regis,
>
> Thank you for these input.
>
> I didn?t know there was a method to randomize the Sobol? sequence in OT.
> This should be the default behaviour for computing the indices as this is known to converge faster. Or at least an option to do it directly would be handy.
>
> Sincerely,
>
> Pamphile ROY
> PhD candidate in Uncertainty Quantification CERFACS?Toulouse
> (31)?France
> +33 (0) 5 61 19 31 57
> +33 (0) 7 86 43 24 22
>
>
>
>> Le 18 juin 2018 ? 23:08, regis lebrun a ?crit :
>>
>> Hi Pamphile,
>>
>> I don't know what are the differences between Saltelli 2002 and Saltelli 2010 as it is not my main field of interest, but OpenTURNS proposes alternative sampling algorithms to compute Sobol indices (first and second order).
>> You are not forced to use a Monte Carlo sampling, you can use any weighted experiment with uniform weights, including LHS experiment and low discrepancy experiments. It is demonstrated in the following script:
>>
>> ===== BEGIN =====
>> from openturns import *
>>
>> mode = "QMC"
>> size = 10000
>>
>> # Toy model
>> model = SymbolicFunction(["x0", "x1", "x2", "x3"],
>> ["x0+x1+x2+x3+x1*x2"])
>>
>> # Here you can use any multivariate distribution with independent
>> copula distribution = Normal(4) if mode == "QMC":
>> sampling_doe = LowDiscrepancyExperiment(SobolSequence(4), distribution, size, False)
>> sampling_doe.setRandomize(True) # If set to False, the results are wrong
>> sampling_doe.setRestart(False) # or True elif mode == "LHS":
>> sampling_doe = LHSExperiment(distribution, size)
>> sampling_doe.setAlwaysShuffle(True) # If set to False, the results are wrong
>> sampling_doe.setRandomShift(False) # or True
>> else:
>> sampling_doe = MonteCarloExperiment(distribution, size) sobol_doe
>> = SobolIndicesExperiment(sampling_doe, True) inputDesign =
>> sobol_doe.generate() outputDesign = model(inputDesign)
>>
>> # Example of use with the different Sobol algorithms
>> Log.Show(Log.NONE)
>> algo = JansenSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Jansen")
>> print("First order=", algo.getFirstOrderIndices()) print("Second
>> order=", algo.getSecondOrderIndices()) algo =
>> MartinezSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Martinez")
>> print("First order=", algo.getFirstOrderIndices()) print("Second
>> order=", algo.getSecondOrderIndices()) algo =
>> MauntzKucherenkoSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("MauntzKucherenko")
>> print("First order=", algo.getFirstOrderIndices()) print("Second
>> order=", algo.getSecondOrderIndices()) algo =
>> SaltelliSensitivityAlgorithm(inputDesign, outputDesign, size)
>> print("Saltelli")
>> print("First order=", algo.getFirstOrderIndices()) print("Second
>> order=", algo.getSecondOrderIndices()) ===== END =====
>>
>> Note that you have to tweak a little bit the LowDiscrepancyExperiment and LHSExperiment classes to get correct results. The fact that the permutation has to be regenerated each time an LHS experiment is sampled is quite natural, but the fact that the low discrepancy sequence has to be randomly shifted is less clear to me... I have not played with the other low discrepancy sequences (Halton, Faure etc) to see if this behavior is general or not.
>>
>> Best regards,
>>
>> R?gis LEBRUN
>>
>>
>>
>> Le lundi 18 juin 2018 ? 17:54:52 UTC+2, roy a ?crit :
>>
>>
>> Hi everyone!
>>
>> From the documentation, Sobol? indices with Saltelli's formulation are computed using its 2002 formula.
>> In Saltelli2010, there is another formulation which is demonstrated to be better.
>>
>> Another point, there is the possibility to use an experiment in SobolIndicesExperiment(). But it is not possible to use Sobol? sequence here.
>> It would be great to add this possibility as it is known to converge
>> faster than the MonteCarloExperiment(). To get A and B with Sobol? sequence, we must split the matrix vertically:
>>
>> input_design = np.array(ot.SobolSequence(dim * 2).generate(size)) A =
>> input_design[:, :dim] B = input_design[:, dim:]
>>
>> Another possibility is to use Sobol? scrambled and split horizontally. But from what I know, this sampler is not available in OT?
>>
>> From the documentation, it is not really clear that the matrices are
>> stacked as [A, B, A_B, B_A]. I had to look at the code to really understand that. Maybe this could be improved?
>>
>> Thanks for the support :)
>>
>>
>> Pamphile ROY
>> PhD candidate in Uncertainty Quantification CERFACS??Toulouse
>> (31)?France
>> +33 (0) 5 61 19 31 57
>> +33 (0) 7 86 43 24 22
>>
>> _______________________________________________
>> OpenTURNS users mailing list
>> users at openturns.org
>> http://openturns.org/mailman/listinfo/users
>
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
From eric.marsden at free.fr Sat Jul 7 18:44:26 2018
From: eric.marsden at free.fr (Eric Marsden)
Date: Sat, 7 Jul 2018 18:44:26 +0200
Subject: [otusers] Fitting a Student distribution with
StudentFactory().build()
MessageID: <9c1389428d191a380fb816deabcdb23b@free.fr>
Hello,
Attempting to fit a Student t distribution to a sample using the
StudentFactory object, I seem to obtain incorrect results:

>>> import openturns as ot
>>> sample = ot.Student(4.0, 100.0, 30.0).getSample(1000)
>>> print(ot.StudentFactory().build(sample))
Student(nu = 2.00123, mu = 99.3967, sigma = 1)

Using a maximum likelihood approach as per the example in the
documentation works, however.
http://openturns.github.io/openturns/latest/examples/data_analysis/maximumlikelihood_estimator.html
I'm using version 1.10 (from Debian) on Python 3.6.
Thanks,
Eric
From regis_anne.lebrun_dutfoy at yahoo.fr Sun Jul 8 20:12:01 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Sun, 8 Jul 2018 18:12:01 +0000 (UTC)
Subject: [otusers] Fitting a Student distribution
with StudentFactory().build()
InReplyTo: <9c1389428d191a380fb816deabcdb23b@free.fr>
References: <9c1389428d191a380fb816deabcdb23b@free.fr>
MessageID: <2005722307.746529.1531073521086@mail.yahoo.com>
Hi Eric,
You found a bug! The current implementation of StudentFactory is based on a moment estimator, and the standard deviation is not updated correctly. I created the associated ticket, it will be fixed soon. In the mean time, you can use either the MaximumLikelihood or the MethodOfMoments classes. By the way, I will probably extend the factory to multivariate Student distributions.
Cheers
R?gis
Le samedi 7 juillet 2018 ? 18:44:35 UTC+2, Eric Marsden a ?crit :
Hello,
Attempting to fit a Student t distribution to a sample using the
StudentFactory object, I seem to obtain incorrect results:

>>> import openturns as ot
>>> sample = ot.Student(4.0, 100.0, 30.0).getSample(1000)
>>> print(ot.StudentFactory().build(sample))
Student(nu = 2.00123, mu = 99.3967, sigma = 1)

Using a maximum likelihood approach as per the example in the
documentation works, however.
http://openturns.github.io/openturns/latest/examples/data_analysis/maximumlikelihood_estimator.html
I'm using version 1.10 (from Debian) on Python 3.6.
Thanks,
Eric
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From roy at cerfacs.fr Thu Jul 26 18:04:07 2018
From: roy at cerfacs.fr (roy)
Date: Thu, 26 Jul 2018 18:04:07 +0200
Subject: [otusers] TypeError with Sobol' indices
MessageID:
Hi everyone,
I am trying to compute Sobol? indices for a functional output (f(R^i) > R^j).
Due to some boundary conditions in my code, some value of the output vector are constants.
At these points, I get a TypeError. This is normal because of the variance being equal to 0.
Using getFirstOrderIndices, I can call it iteratively and avoid the null variance points.
But with getAggregatedFirstOrderIndices, it does not take an index so it will fail for the whole vector.
In both cases, it could be handy to return a NAN, 0 or something else if it detects null variance instead of returning an error.
Thanks for the support.
Sincerely,
Pamphile ROY
PhD candidate in Uncertainty Quantification
CERFACS?Toulouse (31)?France
+33 (0) 5 61 19 31 57
+33 (0) 7 86 43 24 22
 next part 
An HTML attachment was scrubbed...
URL:
From schueller at phimeca.com Fri Jul 27 10:19:29 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Fri, 27 Jul 2018 08:19:29 +0000
Subject: [otusers] TypeError with Sobol' indices
InReplyTo:
References:
MessageID: <47dce87439674484aa7fdce29e2f9e4b@phimeca.com>
An HTML attachment was scrubbed...
URL:
From roy at cerfacs.fr Fri Jul 27 10:26:20 2018
From: roy at cerfacs.fr (roy)
Date: Fri, 27 Jul 2018 10:26:20 +0200
Subject: [otusers] TypeError with Sobol' indices
InReplyTo: <47dce87439674484aa7fdce29e2f9e4b@phimeca.com>
References:
<47dce87439674484aa7fdce29e2f9e4b@phimeca.com>
MessageID: <31E9FFC2767E40B7B5CBD491C0D1488A@cerfacs.fr>
Hello Julien,
Thanks for the answer.
I agree that this should not be silent but having a NAN in the output is quite clear IMO. A warning in the log can also be added.
This is the actual behaviour in Pandas for instance.
Pamphile
> Le 27 juil. 2018 ? 10:19, Julien Schueller  Phimeca a ?crit :
>
> Hello Pamphile,
>
> If we return nan or 0 your script will silently go on and you wont detect the error until it propagates at some higher level, this is not safe. You can still filter out nullvariance components of your doe after evaluation before feeding it to the Sobol algorithm.
>
> j
> De : usersbounces at openturns.org de la part de roy
> Envoy? : jeudi 26 juillet 2018 18:04:07
> ? : users
> Objet : [otusers] TypeError with Sobol' indices
>
> Hi everyone,
>
> I am trying to compute Sobol? indices for a functional output (f(R^i) > R^j).
> Due to some boundary conditions in my code, some value of the output vector are constants.
> At these points, I get a TypeError. This is normal because of the variance being equal to 0.
>
> Using getFirstOrderIndices, I can call it iteratively and avoid the null variance points.
> But with getAggregatedFirstOrderIndices, it does not take an index so it will fail for the whole vector.
>
> In both cases, it could be handy to return a NAN, 0 or something else if it detects null variance instead of returning an error.
>
> Thanks for the support.
>
>
> Sincerely,
>
> Pamphile ROY
> PhD candidate in Uncertainty Quantification
> CERFACS?Toulouse (31)?France
> +33 (0) 5 61 19 31 57
> +33 (0) 7 86 43 24 22
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Fri Aug 3 18:10:07 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Fri, 3 Aug 2018 16:10:07 +0000
Subject: [otusers] Simplified symbolic functions
InReplyTo:
References: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID: <9e67b71d88964ed5a77a073923f0d232@PCYINTPEXMU004.NEOPROD.EDF.FR>
Hi,
I tried the feature you showed with the following script :
Q = 1013.
Ks = 30.
Zv = 50.
Zm = 55.
Hd = 8
Zb = 55.5
L = 5000
B = 300
X = [Q,Ks,Zv,Zm,Hd,Zb,L,B]
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formula = ['var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd']
outputs = ['H', 'S']
myFunction = ot.SymbolicFunction(inputs, outputs, formula)
print(myFunction(X))
But the following exception is generated :
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_SymbolicFunction'.
Possible C/C++ prototypes are:
OT::SymbolicFunction::SymbolicFunction()
OT::SymbolicFunction::SymbolicFunction(OT::String const &,OT::String const &)
OT::SymbolicFunction::SymbolicFunction(OT::Description const &,OT::Description const &)
OT::SymbolicFunction::SymbolicFunction(OT::Description const &,OT::Description const &,OT::String const &)
OT::SymbolicFunction::SymbolicFunction(OT::SymbolicFunction const &)
I also tried a simpler version :
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formula = ['alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); Zc := H + Zv; Zd := Zb + Hd; S := Zc  Zd']
myFunction = ot.SymbolicFunction(inputs, formula)
print(myFunction(X))
TypeError: InvalidArgumentException : Errors found when parsing expression 'alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); Zc := H + Zv; Zd := Zb + Hd; S := Zc  Zd': ERR189  Undefined symbol: 'alpha'
What is the trick you used to make it work ?
(This is with OT 1.11).
Best regards,
Micha?l
Micha?l BAUDIN
Ing?nieur  Chercheur
EDF ? R&D
D?partement Management des Risques Industriels
6, quai Watier
78401 CHATOU
michael.baudin at edf.fr
T?l. : 01 30 87 81 82
Fax : 01 30 87 82 13
Message d'origine
De?: bouzim at gmail.com [mailto:bouzim at gmail.com]
Envoy??: lundi 12 mars 2018 21:26
??: BAUDIN Michael
Cc?: users at openturns.org
Objet?: Re: [otusers] Simplified symbolic functions
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of muParser, it is known to be faster.
Almost all muParser formulas can be parsed by ExprTk without changes, but it also provides many more features. And multiple outputs are trivial with this backend.
This has been implemented on current master, your example can be written:
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B'] outputs = ['H', 'S'] formula = """var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd;"""
myFunction = SymbolicFunction(inputs, outputs, formula)
This is almost straightforward; input and output variables are declared, all other variables must be prefixed by the keyword 'var', assignment is ':=', and statements must be separated by semicolons.
But Python can be as fast as SymbolicFunction; pull request #699 avoids copies between OT and Python, your code could be rewritten as
import numpy as np
def functionCrueSample(X) :
Q, Ks, Zv, Zm, Hd, Zb, L, B = np.array(X, copy=False).T
alpha = (Zm  Zv)/L
H = (Q/(Ks*B*np.sqrt(alpha)))**(3.0/5.0)
Zc = H + Zv
Zd = Zb + Hd
S = Zc  Zd;
Y = np.zeros((len(H), 2))
Y[:,0] = H
Y[:,1] = S
return Y
myFunction = PythonFunction(8, 2, func_sample=functionCrueSample)
Denis
20180214 12:30 GMT+01:00 BAUDIN Michael :
> Hi,
>
>
>
> I have a symbolic function that I would like to simplify and I do not
> see how.
>
>
>
> Here is the test case. The function has 8 inputs and 2 outputs. In
> Python it is simple to define :
>
>
>
> def functionCrue(X) :
>
> Q, Ks, Zv, Zm, Hd, Zb, L, B = X
>
> alpha = (Zm  Zv)/L
>
> H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
>
> Zc = H + Zv
>
> Zd = Zb + Hd
>
> S = Zc  Zd
>
> return [H,S]
>
> myFunction = PythonFunction(8, 2, functionCrue)
>
>
>
> As you can see, the code is simplified by intermediate variables which
> are used by subsequent Python statements. For exemple, the slope of
> the river alpha is first computed, then the height H is computed
> depending on the slope. Then the variable S is computed based on Zc
> and Zd, where Zc is computed depending on the height H.
>
>
>
> When I define the function as a symbolic function, the current
> definition is more involved.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> formulas = ['(Q/(Ks*B*sqrt((Zm 
> Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)+Zv(Zb +
> Hd)']
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> As you can see, I cannot reuse the value of the first output into the
> second output.
>
>
>
> The following interface would be much easier to use. The formulas
> variable is a list of couples, where the first item is the name of the
> output variable and the second item is the string to evaluate it.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> output1 = [?alpha?, '(Zm  Zv)/L']
>
> output2 = [?H?, '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
>
> output3 = [?Zc?, 'H + Zv']
>
> output4 = [?Zd?, 'Zb + Hd']
>
> output5 = [?S?, 'Zc  Zd']
>
> formulas = [output1,output2,output3,output4,output5]
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> Is there another way of doing this ? Do you agree that the suggestion
> is worth being developed ?
>
>
>
> Best regards,
>
>
>
> Micha?l
>
>
> Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont
> ?tablis ? l'intention exclusive des destinataires et les informations
> qui y figurent sont strictement confidentielles. Toute utilisation de
> ce Message non conforme ? sa destination, toute diffusion ou toute
> publication totale ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'?tes pas le destinataire de ce Message, il vous est interdit
> de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie.
> Si vous avez re?u ce Message par erreur, merci de le supprimer de
> votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune
> trace sur quelque support que ce soit. Nous vous remercions ?galement
> d'en avertir imm?diatement l'exp?diteur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de
> toute erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely
> for the addressees. The information contained in this Message is
> confidential. Any use of information contained in this Message not in
> accord with its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or
> use any part of it. If you have received this message in error, please
> delete it and all copies from your system and notify the sender
> immediately by return message.
>
> Email communication cannot be guaranteed to be timely secure, error
> or virusfree.
>
>
> _______________________________________________
> OpenTURNS users mailing list
> users at openturns.org
> http://openturns.org/mailman/listinfo/users
>
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
From regis_anne.lebrun_dutfoy at yahoo.fr Fri Aug 3 18:39:54 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Fri, 3 Aug 2018 16:39:54 +0000 (UTC)
Subject: [otusers] Simplified symbolic functions
InReplyTo: <9e67b71d88964ed5a77a073923f0d232@PCYINTPEXMU004.NEOPROD.EDF.FR>
References: <2dcdb2a178b14127a478fe3c12137e04@PCYINTPEXMU004.NEOPROD.EDF.FR>
<9e67b71d88964ed5a77a073923f0d232@PCYINTPEXMU004.NEOPROD.EDF.FR>
MessageID: <2139129094.1674148.1533314394955@mail.yahoo.com>
Hi Michael,
Try this:
import openturns as ot
Q = 1013.Ks = 30.Zv = 50.Zm = 55.Hd = 8Zb = 55.5L = 5000B = 300X = [Q,Ks,Zv,Zm,Hd,Zb,L,B]
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']?formula = 'var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd'outputs = ['H', 'S']myFunction = ot.SymbolicFunction(inputs, outputs, formula)print(myFunction(X))
In the case of multiple outputs defined using a unique formula, you have to:1) provide the formula as a single string2) declare the intermediate results you want to reuse but not to output using the 'var' qualifier3) provide the list of outputs as a sequence of strings
Cheers
R?gis
Le vendredi 3 ao?t 2018 ? 18:10:15 UTC+2, BAUDIN Michael a ?crit :
Hi,
I tried the feature you showed with the following script :
Q = 1013.
Ks = 30.
Zv = 50.
Zm = 55.
Hd = 8
Zb = 55.5
L = 5000
B = 300
X = [Q,Ks,Zv,Zm,Hd,Zb,L,B]
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formula = ['var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd']
outputs = ['H', 'S']
myFunction = ot.SymbolicFunction(inputs, outputs, formula)
print(myFunction(X))
But the following exception is generated :
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_SymbolicFunction'.
? Possible C/C++ prototypes are:
? ? OT::SymbolicFunction::SymbolicFunction()
? ? OT::SymbolicFunction::SymbolicFunction(OT::String const &,OT::String const &)
? ? OT::SymbolicFunction::SymbolicFunction(OT::Description const &,OT::Description const &)
? ? OT::SymbolicFunction::SymbolicFunction(OT::Description const &,OT::Description const &,OT::String const &)
? ? OT::SymbolicFunction::SymbolicFunction(OT::SymbolicFunction const &)
I also tried a simpler version :
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
formula = ['alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); Zc := H + Zv; Zd := Zb + Hd; S := Zc  Zd']
myFunction = ot.SymbolicFunction(inputs, formula)
print(myFunction(X))
TypeError: InvalidArgumentException : Errors found when parsing expression 'alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); Zc := H + Zv; Zd := Zb + Hd; S := Zc  Zd': ERR189  Undefined symbol: 'alpha'
What is the trick you used to make it work ?
(This is with OT 1.11).
Best regards,
Micha?l
Micha?l BAUDIN
Ing?nieur  Chercheur
EDF ? R&D
D?partement Management des Risques Industriels
6, quai Watier
78401 CHATOU
michael.baudin at edf.fr
T?l. : 01 30 87 81 82
Fax : 01 30 87 82 13
Message d'origine
De?: bouzim at gmail.com [mailto:bouzim at gmail.com]
Envoy??: lundi 12 mars 2018 21:26
??: BAUDIN Michael
Cc?: users at openturns.org
Objet?: Re: [otusers] Simplified symbolic functions
Hello Michael,
We investigated using ExprTk to parse analytical formulas instead of muParser, it is known to be faster.
Almost all muParser formulas can be parsed by ExprTk without changes, but it also provides many more features.? And multiple outputs are trivial with this backend.
This has been implemented on current master, your example can be written:
inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B'] outputs = ['H', 'S'] formula = """var alpha := (Zm  Zv)/L; H := (Q/(Ks*B*sqrt(alpha)))^(3.0/5.0); var Zc := H + Zv; var Zd := Zb + Hd; S := Zc  Zd;"""
myFunction = SymbolicFunction(inputs, outputs, formula)
This is almost straightforward; input and output variables are declared, all other variables must be prefixed by the keyword 'var', assignment is ':=', and statements must be separated by semicolons.
But Python can be as fast as SymbolicFunction; pull request #699 avoids copies between OT and Python, your code could be rewritten as
import numpy as np
def functionCrueSample(X) :
? ? Q, Ks, Zv, Zm, Hd, Zb, L, B = np.array(X, copy=False).T
? ? alpha = (Zm  Zv)/L
? ? H = (Q/(Ks*B*np.sqrt(alpha)))**(3.0/5.0)
? ? Zc = H + Zv
? ? Zd = Zb + Hd
? ? S = Zc  Zd;
? ? Y = np.zeros((len(H), 2))
? ? Y[:,0] = H
? ? Y[:,1] = S
? ? return Y
myFunction = PythonFunction(8, 2, func_sample=functionCrueSample)
Denis
20180214 12:30 GMT+01:00 BAUDIN Michael :
> Hi,
>
>
>
> I have a symbolic function that I would like to simplify and I do not
> see how.
>
>
>
> Here is the test case. The function has 8 inputs and 2 outputs. In
> Python it is simple to define :
>
>
>
> def functionCrue(X) :
>
>? ? Q, Ks, Zv, Zm, Hd, Zb, L, B = X
>
>? ? alpha = (Zm  Zv)/L
>
>? ? H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)
>
>? ? Zc = H + Zv
>
>? ? Zd = Zb + Hd
>
>? ? S = Zc  Zd
>
>? ? return [H,S]
>
> myFunction = PythonFunction(8, 2, functionCrue)
>
>
>
> As you can see, the code is simplified by intermediate variables which
> are used by subsequent Python statements. For exemple, the slope of
> the river alpha is first computed, then the height H is computed
> depending on the slope. Then the variable S is computed based on Zc
> and Zd, where Zc is computed depending on the height H.
>
>
>
> When I define the function as a symbolic function, the current
> definition is more involved.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> formulas = ['(Q/(Ks*B*sqrt((Zm 
> Zv)/L)))^(3.0/5.0)','(Q/(Ks*B*sqrt((Zm  Zv)/L)))^(3.0/5.0)+Zv(Zb +
> Hd)']
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> As you can see, I cannot reuse the value of the first output into the
> second output.
>
>
>
> The following interface would be much easier to use. The formulas
> variable is a list of couples, where the first item is the name of the
> output variable and the second item is the string to evaluate it.
>
>
>
> inputs = ['Q', 'Ks', 'Zv', 'Zm', 'Hd', 'Zb', 'L', 'B']
>
> output1 = [?alpha?, '(Zm  Zv)/L']
>
> output2 = [?H?, '(Q/(Ks*B*sqrt(alpha)))^(3.0/5.0)']
>
> output3 = [?Zc?, 'H + Zv']
>
> output4 = [?Zd?, 'Zb + Hd']
>
> output5 = [?S?, 'Zc  Zd']
>
> formulas = [output1,output2,output3,output4,output5]
>
> myFunction = SymbolicFunction(inputs, formulas)
>
>
>
> Is there another way of doing this ? Do you agree that the suggestion
> is worth being developed ?
>
>
>
> Best regards,
>
>
>
> Micha?l
>
>
> Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont
> ?tablis ? l'intention exclusive des destinataires et les informations
> qui y figurent sont strictement confidentielles. Toute utilisation de
> ce Message non conforme ? sa destination, toute diffusion ou toute
> publication totale ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'?tes pas le destinataire de ce Message, il vous est interdit
> de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie.
> Si vous avez re?u ce Message par erreur, merci de le supprimer de
> votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune
> trace sur quelque support que ce soit. Nous vous remercions ?galement
> d'en avertir imm?diatement l'exp?diteur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de
> toute erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely
> for the addressees. The information contained in this Message is
> confidential. Any use of information contained in this Message not in
> accord with its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or
> use any part of it. If you have received this message in error, please
> delete it and all copies from your system and notify the sender
> immediately by return message.
>
> Email communication cannot be guaranteed to be timely secure, error
> or virusfree.
>
>
> _______________________________________________
> OpenTURNS users mailing list
> users at openturns.org
> http://openturns.org/mailman/listinfo/users
>
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Fri Aug 10 14:22:53 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Fri, 10 Aug 2018 12:22:53 +0000
Subject: [otusers] Confidence bounds of kriging
MessageID:
Hi !
I am currently working on kriging and try to reproduce the graphics which is printed in the carrousel of openturns.org :
https://www.qwant.com/?q=openturns%20kriging&t=images&o=0:1e0b94f86add70a402dfc53f500aa057&size=all&license=all&freshness=all&color=all&imagetype=all&source=web
More precisely, I would like to compute the 95% confidence bounds of the kriging predictions. However, I could not find the Python script corresponding to the figure neither on openturns.org nor in the doc (nor in the Slides of the User's days, nor in the Use Cases Guide). Is this Python script available ?
I also tried to produce the script by myself, and failed.... In PS, I put a Python script which tries to reproduce the figure. The confidence bounds produced by the script are extremely tight compared to what I expected. My guess is that the issue is related to the estimate of the covariance model : in OpenTURNS, the SquaredExponential is anisotropic while the figure might be produced with an isotropic covariance. I also tried to prevent the optimization algorithm from tuning the theta parameter with the setOptimizeParameters method, but I wasn't able to use correctly (the parameters still change, however with a different value). What is the explanation for these tight bounds ?
Best regards,
Micha?l
PS
# coding: utf8
#
# # R?f?rences
#
# Metamodeling with Gaussian processes, Bertrand Iooss, EDF R&D, 2014, www.gdrmascotnum.fr/media/sssamo14_iooss.pdf
#
import numpy as np
import openturns as ot
import pylab as pl
#
n_test = 100
x_test_coord = np.linspace(0,12,n_test)
x_test = ot.Sample(x_test_coord,1)
y_test = np.sin(x_test)
# Base d'apprentissage de 7 points.
#
x_train_coord = [1.,3.,4.,6.,7.9,11., 11.5]
x_train = ot.Sample(x_train_coord,1)
y_train = np.sin(x_train)
n_train = len(x_train)
n_train
#
dimension = 1
basis = ot.ConstantBasisFactory(dimension).build()
covarianceModel = ot.SquaredExponential([1.]*dimension, [5.0])
algo = ot.KrigingAlgorithm(x_train, y_train, covarianceModel, basis)
algo.setOptimizeParameters(False)
algo.run()
result = algo.getResult()
krigeageMM = result.getMetaModel()
#
krigeageMM = result.getMetaModel()
y_test_MM = krigeageMM(x_test)
#
level = 0.95
alpha = (1level)/2
sampleQinf = ot.Sample(n_test,1)
sampleQsup = ot.Sample(n_test,1)
for i in range(n_test):
xi = x_test[i]
var = result.getConditionalCovariance(xi)[0,0]
yi = y_test_MM[i][0]
N = ot.Normal(yi,np.sqrt(var))
q025 = N.computeQuantile(alpha)[0]
sampleQinf[i,0] = q025
q975 = N.computeQuantile(1alpha)[0]
sampleQsup[i,0] = q975
#
pl.plot(x_test,y_test,"k",label="Exact")
pl.plot(x_test,y_test_MM,"b",label="Krigeage")
pl.plot(x_train,y_train,"ro",label="Apprentissage")
pl.plot(x_test,sampleQinf,"g",label="%.2f%%" % (100*level))
pl.plot(x_test,sampleQsup,"g")
pl.title("sin")
pl.xlabel("X")
pl.ylabel("Y")
pl.legend()
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From regis_anne.lebrun_dutfoy at yahoo.fr Fri Aug 10 22:31:24 2018
From: regis_anne.lebrun_dutfoy at yahoo.fr (regis lebrun)
Date: Fri, 10 Aug 2018 20:31:24 +0000 (UTC)
Subject: [otusers] Confidence bounds of kriging
InReplyTo:
References:
MessageID: <1576124940.5557565.1533933084886@mail.yahoo.com>
Hi Michael,
Have a look here:https://github.com/openturns/www/blob/master/_images/scripts/plot_kriging.py
I will check your script next rainy day!
Cheers
R?gis
Le vendredi 10 ao?t 2018 ? 14:22:58 UTC+2, BAUDIN Michael a ?crit :
Hi?!
?
I am currently working on kriging and try to reproduce the graphics which is printed in the carrousel of openturns.org :
?
https://www.qwant.com/?q=openturns%20kriging&t=images&o=0:1e0b94f86add70a402dfc53f500aa057&size=all&license=all&freshness=all&color=all&imagetype=all&source=web
?
More precisely, I would like to compute the 95% confidence bounds of the kriging predictions. However, I could not find the Python script corresponding to the figure neither on openturns.org nor in the doc (nor in the Slides of the User?s days, nor in the Use Cases Guide). Is this Python script available ?
?
I also tried to produce the script by myself, and failed.... In PS, I put a Python script which tries to reproduce the figure. The confidence bounds produced by the script are extremely tight compared to what I expected. My guess is that the issue is related to the estimate of the covariance model : in OpenTURNS, the SquaredExponential is anisotropic while the figure might be produced with an isotropic covariance. I also tried to prevent the optimization algorithm from tuning the theta parameter with the setOptimizeParameters method, but I wasn?t able to use correctly (the parameters still change, however with a different value). What is the explanation for these tight bounds ?
?
Best regards,
?
Micha?l
PS
?
# coding: utf8
#
# # R?f?rences
#
# Metamodeling with Gaussian processes, Bertrand Iooss, EDF R&D, 2014, www.gdrmascotnum.fr/media/sssamo14_iooss.pdf
?
#
import numpy as np
import openturns as ot
import pylab as pl
?
#
n_test = 100
x_test_coord = np.linspace(0,12,n_test)
x_test = ot.Sample(x_test_coord,1)
y_test = np.sin(x_test)
?
# Base d'apprentissage de 7 points.
#
x_train_coord = [1.,3.,4.,6.,7.9,11., 11.5]
x_train = ot.Sample(x_train_coord,1)
y_train = np.sin(x_train)
n_train = len(x_train)
n_train
?
#
dimension = 1
basis = ot.ConstantBasisFactory(dimension).build()
covarianceModel = ot.SquaredExponential([1.]*dimension, [5.0])
algo = ot.KrigingAlgorithm(x_train, y_train, covarianceModel, basis)
algo.setOptimizeParameters(False)
algo.run()
result = algo.getResult()
krigeageMM = result.getMetaModel()
?
#
krigeageMM = result.getMetaModel()
y_test_MM = krigeageMM(x_test)
?
#
level = 0.95
alpha = (1level)/2
sampleQinf = ot.Sample(n_test,1)
sampleQsup = ot.Sample(n_test,1)
for i in range(n_test):
??? xi = x_test[i]
??? var = result.getConditionalCovariance(xi)[0,0]
??? yi = y_test_MM[i][0]
???N = ot.Normal(yi,np.sqrt(var))
??? q025 = N.computeQuantile(alpha)[0]
??? sampleQinf[i,0] = q025
??? q975 = N.computeQuantile(1alpha)[0]
???sampleQsup[i,0] = q975
?
#
pl.plot(x_test,y_test,"k",label="Exact")
pl.plot(x_test,y_test_MM,"b",label="Krigeage")
pl.plot(x_train,y_train,"ro",label="Apprentissage")
pl.plot(x_test,sampleQinf,"g",label="%.2f%%" % (100*level))
pl.plot(x_test,sampleQsup,"g")
pl.title("sin")
pl.xlabel("X")
pl.ylabel("Y")
pl.legend()
?
?
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
_______________________________________________
OpenTURNS users mailing list
users at openturns.org
http://openturns.org/mailman/listinfo/users
 next part 
An HTML attachment was scrubbed...
URL:
From schueller at phimeca.com Mon Sep 3 09:17:31 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Mon, 3 Sep 2018 07:17:31 +0000
Subject: [otusers] Confidence bounds of kriging
InReplyTo: <20180810122258.EFFB5ED9D9_B6D83A2B@smtp.datacenter.ibo.fr>
References: <20180810122258.EFFB5ED9D9_B6D83A2B@smtp.datacenter.ibo.fr>
MessageID: <7242dafb388b4f399a79b662bd3f270c@phimeca.com>
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Fri Sep 14 18:35:41 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Fri, 14 Sep 2018 16:35:41 +0000
Subject: [otusers] How to use the Kolmogorov test when parameters are
estimated with a 2parameters Gamma ?
MessageID:
Hi all !
I would like to use the Kolmogorov test for a special Gamma distribution :
? The parameters are estimated from the data,
? The shift parameter is set to zero.
I thought that the PR #783 would solve the first issue :
https://github.com/openturns/openturns/pull/783
The difference between the distribution I want and ot.Gamma is that ot.Gamma has three parameters : shape, scale and shift, while I only want to have 2 parameters : shape and scale.
I initially planned to use the PythonDistribution in order to create a specific Gamma distribution with 2 parameters like this.
import openturns as ot
from openturns.viewer import View
class GammaZeroShift(ot.PythonDistribution):
def __init__(self, shape=1.0, scale=1.0):
# shape : k in Gamma
# scale : lambda in Gamma
dim = 1
super().__init__(dim)
self.shape = shape
self.scale = scale
shift = 0.
self.internalGamma = ot.Gamma(shape,scale,shift)
def computePDF(self, X):
return self.internalGamma.computePDF(X)
def computeCDF(self, X):
return self.internalGamma.computeCDF(X)
# Create such a distribution
shape = 1.
scale = 5.
mag = ot.Distribution(GammaZeroShift(shape,scale))
View(mag.drawPDF())
The Kolmogorov test goes like this.
# Create a sample from this distribution
samplesize = 1000
threshold = 0.95
sample = mag.getSample(samplesize)
# Use QQPlot
qqplot = ot.VisualTest.DrawQQplot(sample, mag)
View(qqplot)
# Use KS test
result = ot.FittingTest.Kolmogorov(sample, mag)
print("PValue:%f" % (result.getPValue()))
print("Threshold:%f" % (result.getThreshold()))
print("Cannot Reject:%s"% (result.getBinaryQualityMeasure()))
However, this is a wrong approach. When the parameters are estimated from the data, the argument of Kolmogorov must be the DistributionFactory, not the Distribution itself. This is because the Kolmogorov class must estimate the parameters from the data, which is not possible if the distribution is given with the parameters already inside.
The problem is : there is no PythonDistributionFactory, isn't it ?
Here would be a potential workaround : would it be possible to create parametrized Gamma distribution, by restraining the parameters of the Gamma so that the shift parameter is set to zero?
Best regards,
Micha?l
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From schueller at phimeca.com Tue Oct 9 14:26:59 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Tue, 9 Oct 2018 12:26:59 +0000
Subject: [otusers] [ANN] OpenTURNS 1.12 RC1 released
MessageID: <8466a7224c7444779d3aa22b5c153b5d@phimeca.com>
An HTML attachment was scrubbed...
URL:
From michael.baudin at edf.fr Mon Nov 12 15:12:47 2018
From: michael.baudin at edf.fr (BAUDIN Michael)
Date: Mon, 12 Nov 2018 14:12:47 +0000
Subject: [otusers] Install otrobopt with anaconda
MessageID:
Hi,
I tried to install otrobopt with anaconda on Windows, but failed to load the version 0.4 of the package :
(base) C:\Users\MYACCOUNT>conda install otrobopt
Solving environment: done
## Package Plan ##
environment location: C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3
added / updated specs:
 otrobopt
The following NEW packages will be INSTALLED:
otrobopt: 0.4py36_1000 condaforge
Proceed ([y]/n)?
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) C:\Users\MYACCOUNT>python
Python 3.6.5 Anaconda, Inc. (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import otrobopt
Traceback (most recent call last):
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\sitepackages\otrobopt\otrobopt.py", line 17, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: DLL load failed: La proc?dure sp?cifi?e est introuvable.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\sitepackages\otrobopt\__init__.py", line 16, in
from .otrobopt import *
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\sitepackages\otrobopt\otrobopt.py", line 20, in
_otrobopt = swig_import_helper()
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\sitepackages\otrobopt\otrobopt.py", line 19, in swig_import_helper
return importlib.import_module('_otrobopt')
File "C:\Users\MYACCOUNT\AppData\Local\Continuum\anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_otrobopt'
>>>
I tried to install the v0.3, with the same result.
What can I try to solve the issue ?
Best regards,
Micha?l
Ce message et toutes les pi?ces jointes (ciapr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
Email communication cannot be guaranteed to be timely secure, error or virusfree.
 next part 
An HTML attachment was scrubbed...
URL:
From schueller at phimeca.com Tue Nov 13 14:22:21 2018
From: schueller at phimeca.com (Julien Schueller  Phimeca)
Date: Tue, 13 Nov 2018 13:22:21 +0000
Subject: [otusers] [ANN] Openturns 1.12 released
MessageID: <14f388443ec7475bb8250ccbaa3955d4@phimeca.com>
An HTML attachment was scrubbed...
URL: