Beispiel #1
0
myMesh = myMesher.build(myInterval)

# Define a scalar temporal normal process on the mesh
# this process is stationary
# myXproc R^2 --> R
amplitude = [1.0]
scale = [0.2, 0.2]
myCovModel = ot.ExponentialModel(myMesh.getDimension(), amplitude, scale)
myXproc = ot.TemporalNormalProcess(myCovModel, myMesh)

# Transform myXproc to make its variance depend on the vertex (s,t)
# and to get a positive process
# thanks to the spatial function g
# myXtProcess R --> R
g = ot.NumericalMathFunction(['x1'], ['exp(x1)'])
myDynTransform = ot.SpatialFunction(g, 2)
myXtProcess = ot.CompositeProcess(myDynTransform, myXproc)

myField = myXtProcess.getRealization()
graphMarginal1 = ot.KernelSmoothing().build(myField.getValues()).drawPDF()
graphMarginal1.setTitle("")
graphMarginal1.setXTitle("X")
graphMarginal1.setLegendPosition("")

# Initiate a BoxCoxFactory
myBoxCoxFactory = ot.BoxCoxFactory()

graph = ot.Graph()
shift = [0.0]

# We estimate the lambda parameter from the field myField
Beispiel #2
0
deltaT = 0.1
steps = 11

# Initialization of the TimeGrid timeGrid
timeGrid = ot.RegularGrid(Tmin, deltaT, steps)

# Creation of the Antecedent
myARMAProcess = ot.ARMA()
myARMAProcess.setTimeGrid(timeGrid)
print('myAntecedentProcess = ',  myARMAProcess)

# Creation of a function
f = ot.NumericalMathFunction(['x'], ['2 * x + 5.0'])

# We build a dynamical function
myDynamicalFunction = ot.DynamicalFunction(ot.SpatialFunction(f))

# finally we get the compsite process
myCompositeProcess = ot.CompositeProcess(myDynamicalFunction, myARMAProcess)
print('myCompositeProcess = ',  repr(myCompositeProcess))

# Test realization
print('One realization= ')
print(myCompositeProcess.getRealization())


##########################################
# Create a spatial  dynamical function
# Create the function g : R^2 --> R^2
#               (x1,x2) --> (x1^2, x1+x2)
g = ot.NumericalMathFunction(['x1', 'x2'],  ['x1^2', 'x1+x2'])