# IntegrationStrategy guidelines

**URL:** <https://openturns.discourse.group/t/integrationstrategy-guidelines/220>\
**Category:** Methodology\
**Tags:** polynomial-chaos\
**Created:** [June 28, 2022, 3:53pm UTC](https://openturns.discourse.group/t/integrationstrategy-guidelines/220 "2022-06-28T15:53:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![schueller](https://yyz2.discourse-cdn.com/free1/user_avatar/openturns.discourse.group/schueller/32/3_2.png) [@schueller](https://openturns.discourse.group/u/schueller)\
**Post date:** [June 28, 2022, 3:53pm UTC](https://openturns.discourse.group/t/integrationstrategy-guidelines/220/1 "2022-06-28T15:53:11Z")

</div>

Are there any tips on the DOEs to use with IntegrationStrategy ?

In the integration example with the beam from the doc, GaussProductExperiment works great:

> <https://github.com/openturns/openturns/blob/master/python/doc/examples/meta_modeling/polynomial_chaos_metamodel/plot_chaos_cantilever_beam_integration.py>

But if I try to use anything else (MC, QMC, LHS) the Q2 is off.

I tried to play with the parameters a bit more on the ishigami example, but here GaussProduct is the worst, whereas LHS works okish for Integration (and LSQ).

[t\_FunctionalChaos\_ishigami.py](https://openturns.discourse.group/uploads/short-url/qrRYgNjPY2cHzfsd28vxf7unwlM.py) (4.6 KB)

```auto
indexMax : 165
basisDimension : 35
#
LeastSquaresStrategy CleaningStrategy GaussProductExperiment
residuals= [0.00326924]
relativeErrors= [0.000148401]
q2= 0.6742196972690251
#
LeastSquaresStrategy CleaningStrategy MonteCarloExperiment
residuals= [0.00398503]
relativeErrors= [0.000200195]
q2= 0.9996719545183788
#
LeastSquaresStrategy CleaningStrategy LHSExperiment
residuals= [0.00384169]
relativeErrors= [0.00023227]
q2= 0.999748079348371
#
LeastSquaresStrategy CleaningStrategy LowDiscrepancyExperiment
residuals= [0.00405544]
relativeErrors= [0.00023333]
q2= 0.999570535163289
#
IntegrationStrategy CleaningStrategy GaussProductExperiment
residuals= [0.429421]
relativeErrors= [0]
q2= 0.13608543870079193
#
IntegrationStrategy CleaningStrategy MonteCarloExperiment
residuals= [0.458122]
relativeErrors= [0]
q2= 0.3015436285332618
#
IntegrationStrategy CleaningStrategy LHSExperiment
residuals= [0.220629]
relativeErrors= [0]
q2= 0.2585766677022334
#
IntegrationStrategy CleaningStrategy LowDiscrepancyExperiment
residuals= [0.242792]
relativeErrors= [0]
q2= 0.7110390071876536

```

---

<div class="post-metadata">

**Author:** ![schueller](https://yyz2.discourse-cdn.com/free1/user_avatar/openturns.discourse.group/schueller/32/3_2.png) [@schueller](https://openturns.discourse.group/u/schueller)\
**Post date:** [July 12, 2022, 1:35pm UTC](https://openturns.discourse.group/t/integrationstrategy-guidelines/220/2 "2022-07-12T13:35:07Z")

</div>

nevermind, with MC sampling size must be set up to 1e6 to get a decent Q2 (only 256 with GaussProd)

---

<div class="post-metadata">

**Author:** ![MichaelBaudin](https://yyz2.discourse-cdn.com/free1/user_avatar/openturns.discourse.group/michaelbaudin/32/9_2.png) [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Post date:** [August 2, 2022, 5:24pm UTC](https://openturns.discourse.group/t/integrationstrategy-guidelines/220/3 "2022-08-02T17:24:37Z")

</div>

Hi Julien,  
I wanted to see how the different sampling methods compare in terms of convergence of the Q^2 coefficient depending on the sampling method. I made some experiments in the following [notebook](https://github.com/mbaudin47/otsupgalilee-eleve/blob/NotesMai2022/5-Chaos/convergence_chaos_integration.ipynb). Based on your simulations, I expect that the tensorized Gauss rule leads to a much smaller sample size, but the actual speed of convergence is unknown to me in the cantilever beam case.

So I used four different sampling methods:

- Gauss product
- Monte-Carlo sampling
- Latin hypercube sampling
- Quasi Monte Carlo with a Sobol’ sequence

Since some of these methods are random, I repeat each experiment 5 times.

This is the result:

![image](https://global.discourse-cdn.com/free1/uploads/openturns/original/1X/5ff76aa0117a5dc37b2d5f284a195ab2d890142d.png)

We see that the tensorized Gauss rule leads to a Q^2 coefficient which is very close to 1 with as few as approximately 500 nodes. The Sobol’ sequence needs approximately 10^4 points to get Q^2 \> 0.9. Both LHS and Monte-Carlo need more than 10^5 points. Overall, the ranking is as follows:

\textrm{Gauss} \> \textrm{Sobol'} \> \textrm{Monte-Carlo} \approx \textrm{LHS}. 

We will see how Smolyak behaves when this quadrature is available.

Best regards,

Michaël
