.. only:: html
.. note::
:class: sphx-glr-download-link-note
Click :ref:`here ` to download the full example code
.. rst-class:: sphx-glr-example-title
.. _sphx_glr_auto_reliability_sensitivity_design_of_experiments_plot_probabilistic_design.py:
Probabilistic design of experiments
===================================
In this example we are going to expose the available probabilistic design of experiments generated according to a specified distribution and a specified number of points.
.. code-block:: default
from __future__ import print_function
import openturns as ot
import math as m
import openturns.viewer as viewer
from matplotlib import pylab as plt
ot.Log.Show(ot.Log.NONE)
Create the target distribution
.. code-block:: default
distribution = ot.Normal(2)
N = 300
1. Monte Carlo
.. code-block:: default
experiment = ot.MonteCarloExperiment(distribution, N)
sample = experiment.generate()
graph = ot.Cloud(sample)
view = viewer.View(graph)
.. image:: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_001.png
:alt: plot probabilistic design
:class: sphx-glr-single-img
2. LHS
.. code-block:: default
experiment = ot.LHSExperiment(distribution, N)
sample = experiment.generate()
graph = ot.Cloud(sample)
view = viewer.View(graph)
plt.show()
.. image:: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_002.png
:alt: plot probabilistic design
:class: sphx-glr-single-img
.. rst-class:: sphx-glr-timing
**Total running time of the script:** ( 0 minutes 0.062 seconds)
.. _sphx_glr_download_auto_reliability_sensitivity_design_of_experiments_plot_probabilistic_design.py:
.. only :: html
.. container:: sphx-glr-footer
:class: sphx-glr-footer-example
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code: plot_probabilistic_design.py `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: plot_probabilistic_design.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_