.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_probabilistic_modeling/copulas/plot_composed_copula.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_probabilistic_modeling_copulas_plot_composed_copula.py: Assemble copulas ================ .. GENERATED FROM PYTHON SOURCE LINES 6-8 In this example we are going to merge a collection of independent copulas into one. .. GENERATED FROM PYTHON SOURCE LINES 10-15 .. code-block:: default import openturns as ot import openturns.viewer as viewer from matplotlib import pylab as plt ot.Log.Show(ot.Log.NONE) .. GENERATED FROM PYTHON SOURCE LINES 16-17 create a collection of copulas .. GENERATED FROM PYTHON SOURCE LINES 17-22 .. code-block:: default R = ot.CorrelationMatrix(3) R[0, 1] = 0.5 R[0, 2] = 0.25 collection = [ot.FrankCopula(3.0), ot.NormalCopula(R), ot.ClaytonCopula(2.0)] .. GENERATED FROM PYTHON SOURCE LINES 23-24 merge the copulas .. GENERATED FROM PYTHON SOURCE LINES 24-26 .. code-block:: default copula = ot.ComposedCopula(collection) print(copula) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ComposedCopula(FrankCopula(theta = 3), NormalCopula(R = [[ 1 0.5 0.25 ] [ 0.5 1 0 ] [ 0.25 0 1 ]]), ClaytonCopula(theta = 2)) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.001 seconds) .. _sphx_glr_download_auto_probabilistic_modeling_copulas_plot_composed_copula.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_composed_copula.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_composed_copula.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_