Create a composite distributionΒΆ

In this example we are going to create a distribution defined as the push-forward distribution of a scalar distribution by a transformation.

If we note \mathcal{L}_0 a scalar distribution, f: \mathbb{R} \rightarrow \mathbb{R} a mapping, then it is possible to create the push-forward distribution \mathcal{L} defined by

\mathcal{L} = f(\mathcal{L}_0)

from __future__ import print_function
import openturns as ot
# create an 1-d distribution
antecedent = ot.Normal()
# Create an 1-d transformation
f = ot.SymbolicFunction(['x'], ['sin(x)+cos(x)'])
# Create the composite distribution
distribution = ot.CompositeDistribution(f, antecedent)
# Using the simplified construction
distribution = antecedent.exp()
# Using chained operators
distribution = antecedent.abs().sqrt()