File: Copula.rst_t

package info (click to toggle)
openturns 1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 38,588 kB
  • ctags: 26,495
  • sloc: cpp: 144,032; python: 26,855; ansic: 7,868; sh: 419; makefile: 263; yacc: 123; lex: 44
file content (35 lines) | stat: -rw-r--r-- 1,073 bytes parent folder | download
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
{{ objname }}
{{ underline }}{{ underline }}

.. plot::
    :include-source: False

    import openturns as ot
    from matplotlib import pyplot as plt
    from openturns.viewer import View
    if (ot.{{ objname }}().__class__.__name__=='SklarCopula'):
      myStudent = ot.Student(3.0, [1.0]*2, [3.0]*2, ot.CorrelationMatrix(2))
      copula =  ot.SklarCopula(myStudent)
    else:
      copula = ot.{{ objname }}()
    if copula.getDimension() == 1:
        copula = ot.{{ objname }}(2)
    copula.setDescription(['$y_1$', '$y_2$'])
    pdf_graph = copula.drawPDF()
    cdf_graph = copula.drawCDF()
    fig = plt.figure(figsize=(10, 4))
    plt.suptitle(str(copula))
    pdf_axis = fig.add_subplot(121)
    cdf_axis = fig.add_subplot(122)
    View(pdf_graph, figure=fig, axes=[pdf_axis], add_legend=False)
    View(cdf_graph, figure=fig, axes=[cdf_axis], add_legend=False)
    pdf_axis.set_aspect('equal')
    cdf_axis.set_aspect('equal')

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

   {% block methods %}
   .. automethod:: __init__
   {% endblock %}