Hello
Previously (and basically) I build polynomial chaos metamodels with first constructor
ot.FunctionalChaosAlgorithm(input_sample, output_rsample[:,outputIndex])
And I managed to get good results for my first output of interest called ‘P54’ (it’s less good for other results, but this is not my issue here)
I got following results (Q2 values) :
Ordre max des polynômes | P54 |
---|---|
5 | 0.996616 |
6 | 0.997264 |
7 | 0.997182 |
8 | 0.997103 |
9 | 0.995828 |
10 | 0.99554 |
11 | 0.996343 |
12 | 0.995775 |
13 | 0.995775 |
14 | 0.996177 |
15 | 0.996219 |
Now we are trying with another constructor, where we give inputs distributions
ot.FunctionalChaosAlgorithm(input_sample, output_rsample[:,outputIndex],inputs_composed_distrib,adaptiveStrategy)
In this case we have to give also “adaptiveStrategy”
Below an extract of my script
polyColl = [0.0]*input_param_number
enumerateFunction = ot.LinearEnumerateFunction(input_param_number)
for i in range(input_param_number):
polyColl[i] = ot.StandardDistributionPolynomialFactory(inputs_composed_distrib.getMarginal(i))
productBasis = ot.OrthogonalProductPolynomialFactory(polyColl, enumerateFunction)
print("\n >> Metamodel comparison : Various degrees of chaos polynomials")
for maximumDegree in range(degreeMin,degreeMax+1):
ot.ResourceMap.SetAsUnsignedInteger("FunctionalChaosAlgorithm-MaximumTotalDegree",maximumDegree)
print(" >> Maximum total degree =", maximumDegree)
strataIndex = enumerateFunction.getMaximumDegreeStrataIndex(maximumDegree)
maximumBasisSize = enumerateFunction.getStrataCumulatedCardinal(strataIndex)
adaptiveStrategy = ot.CleaningStrategy(productBasis,maximumBasisSize)
chaosalgo = ot.FunctionalChaosAlgorithm(input_sample, output_rsample[:,outputIndex],inputs_composed_distrib,adaptiveStrategy)
chaosalgo.run()
result = chaosalgo.getResult()
metamodel = result.getMetaModel()
val = ot.MetaModelValidation(checkin_sample, checkout_rsample[:,outputIndex], metamodel.getMarginal(0))
Q2 = val.computePredictivityFactor()[0]
With this new script, it’s weird, we got these results (Q2 values) :
Ordre max des polynômes | Fixed Strategy | SequentialStrategy | CleaningStrategy |
---|---|---|---|
1 | 0.995247 | 0.995247 | 0.995247 |
2 | 0.997051 | 0.997051 | 0.998558 |
3 | -136.016 | -1.388727 | 0.998563 |
4 | -169.354 | -1.388727 | 0.998503 |
5 | -173.659 | -1.388727 | 0.998551 |
6 | -178.550 | -1.388727 | 0.997670 |
7 | -182.090 | -1.388727 | 0.992749 |
Temps de calcul | 26min45 | 1min04 | 38h |
We tried the 3 available strategies
For Fixed or Sequential Strategy results are very bad for order>2, and with Cleaning Strategy it’s good but very very long !
Any idea about this problem ?
Do I use wrong instructions to build PCE ?
Thanks a lot for your help!
See you
Flore