Create the ordinal sum of copulasΒΆ

In this basic example we are going to create an ordinal sum of copulas.

In [1]:
from __future__ import print_function
import openturns as ot
In [2]:
# Create a collection of copulas
collection = [ot.GumbelCopula(2), ot.NormalCopula(2)]
In [3]:
# Merge the copulas
bounds = [0.3]
copula = ot.OrdinalSumCopula(collection, bounds)
print(copula)
OrdinalSumCopula([0, 0.3], GumbelCopula(theta = 2), [0.3, 1], NormalCopula(R = [[ 1 0 ]
 [ 0 1 ]]))
In [4]:
# Draw PDF
graph = copula.drawPDF([512]*2)
graph.setXTitle('x')
graph.setYTitle('y')
graph.setLegendPosition('')
graph
Out[4]:
../../_images/examples_probabilistic_modeling_ordinal_sum_copula_5_0.svg