Aggregate processesΒΆ

In this example we are going to concatenate several processes that share the same mesh.

[55]:
from __future__ import print_function
import openturns as ot
[56]:
# Create processes to aggregate
myMesher = ot.IntervalMesher(ot.Indices([100,10]))
lowerbound = [0.0, 0.0]
upperBound = [2.0, 4.0]
myInterval = ot.Interval(lowerbound, upperBound)
myMesh = myMesher.build(myInterval)
myProcess1 = ot.WhiteNoise(ot.Normal(), myMesh)
myProcess2 = ot.WhiteNoise(ot.Triangular(), myMesh)

[57]:
# Draw values of a realization of the 2nd process
marginal = ot.HistogramFactory().build(myProcess1.getRealization().getValues())
marginal.drawPDF()
[57]:
../../_images/examples_probabilistic_modeling_aggregated_process_4_0.svg
[58]:
# Create an aggregated process
myAggregatedProcess = ot.AggregatedProcess([myProcess1, myProcess2])
[59]:
# Draw values of the realization on the 2nd marginal
marginal = ot.HistogramFactory().build(myAggregatedProcess.getRealization().getValues().getMarginal(0))
marginal.drawPDF()
[59]:
../../_images/examples_probabilistic_modeling_aggregated_process_6_0.svg