Note
Go to the end to download the full example code
Create the ordinal sum of copulasΒΆ
In this example we are going to create an ordinal sum of copulas.
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt
ot.Log.Show(ot.Log.NONE)
Create a collection of copulas
collection = [ot.GumbelCopula(2), ot.NormalCopula(2)]
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 ]]))
Draw PDF
graph = copula.drawPDF([512] * 2)
graph.setXTitle("x")
graph.setYTitle("y")
graph.setLegendPosition("")
view = viewer.View(graph)
plt.show()
Total running time of the script: ( 0 minutes 0.476 seconds)