1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
{{ objname }}
{{ underline }}{{ underline }}
.. plot::
:include-source: False
import openturns as ot
from matplotlib import pyplot as plt
import openturns.viewer as otv
ot.RandomGenerator.SetSeed(0)
if "{{ objname }}" == "Process":
# default to Gaussian for the interface class
process = ot.GaussianProcess()
elif "{{ objname }}" == "DiscreteMarkovChain":
process = ot.{{ objname }}()
process.setTransitionMatrix(ot.SquareMatrix([[0.0,0.5,0.5],[0.7,0.0,0.3],[0.8,0.0,0.2]]))
origin = 0
process.setOrigin(origin)
else:
process = ot.{{ objname }}()
process.setTimeGrid(ot.RegularGrid(0.0, 0.02, 50))
process.setDescription(["$x$"])
sample = process.getSample(6)
sample_graph = sample.drawMarginal(0)
sample_graph.setTitle(str(process))
fig = plt.figure(figsize=(10, 4))
sample_axis = fig.add_subplot(111)
otv.View(sample_graph, figure=fig, axes=[sample_axis], add_legend=False)
.. currentmodule:: {{ module }}
.. autoclass:: {{ objname }}
{% block methods %}
.. automethod:: __init__
{% endblock %}
.. minigallery:: {{module}}.{{objname}}
:add-heading: Examples using the class
|