.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_reliability_sensitivity/design_of_experiments/plot_probabilistic_design.py" .. LINE NUMBERS ARE GIVEN BELOW. .. 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 =================================== .. GENERATED FROM PYTHON SOURCE LINES 6-7 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. .. GENERATED FROM PYTHON SOURCE LINES 9-16 .. 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) .. GENERATED FROM PYTHON SOURCE LINES 17-18 Create the target distribution .. GENERATED FROM PYTHON SOURCE LINES 18-21 .. code-block:: default distribution = ot.Normal(2) N = 300 .. GENERATED FROM PYTHON SOURCE LINES 22-23 1. Monte Carlo .. GENERATED FROM PYTHON SOURCE LINES 23-28 .. code-block:: default experiment = ot.MonteCarloExperiment(distribution, N) sample = experiment.generate() graph = ot.Cloud(sample) view = viewer.View(graph) .. image-sg:: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_001.png :alt: plot probabilistic design :srcset: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 29-30 2. LHS .. GENERATED FROM PYTHON SOURCE LINES 30-35 .. code-block:: default experiment = ot.LHSExperiment(distribution, N) sample = experiment.generate() graph = ot.Cloud(sample) view = viewer.View(graph) plt.show() .. image-sg:: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_002.png :alt: plot probabilistic design :srcset: /auto_reliability_sensitivity/design_of_experiments/images/sphx_glr_plot_probabilistic_design_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.100 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 `_