Create a random walk processΒΆ

In this basic example we are going to build a white noise process by its origin and distribution.

In [1]:
from __future__ import print_function
import openturns as ot
import math as m
In [2]:
# Define the distribution, origin
myDist = ot.ComposedDistribution([ot.Normal(), ot.Exponential(0.2)], ot.ClaytonCopula(0.5))
myOrigin = ot.Point(myDist.getMean())
In [3]:
# Define the mesh
myTimeGrid = ot.RegularGrid(0, 0.1, 10)
In [4]:
# Create the process:
process = ot.RandomWalk(myOrigin, myDist, myTimeGrid)
class=ProcessImplementation dimension=2 description=[X0,X1] mesh=class=Mesh name=Unnamed dimension=1 vertices=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10 dimension=1 description=[t] data=[[0],[0.1],[0.2],[0.3],[0.4],[0.5],[0.6],[0.7],[0.8],[0.9]] simplices=[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]]
In [5]:
# Draw a sample
sample = process.getSample(6)