chaospy.Clayton

class chaospy.Clayton(dist, theta=2.0)[source]

Clayton Copula.

Examples:
>>> distribution = chaospy.Clayton(
...     chaospy.Iid(chaospy.Uniform(-1, 1), 2), theta=2)
>>> distribution
Clayton(Iid(Uniform(lower=-1, upper=1), 2), theta=2)
>>> samples = distribution.sample(3)
>>> samples.round(4)
array([[ 0.3072, -0.77  ,  0.9006],
       [ 0.2736, -0.3015,  0.1539]])
>>> distribution.pdf(samples).round(4)
array([0.3679, 0.1855, 0.2665])
>>> distribution.fwd(samples).round(4)
array([[0.6536, 0.115 , 0.9503],
       [0.4822, 0.8725, 0.2123]])
>>> mesh = numpy.meshgrid([.4, .5, .6], [.4, .5, .6])
>>> distribution.inv(mesh).round(4)
array([[[-0.2   ,  0.    ,  0.2   ],
        [-0.2   ,  0.    ,  0.2   ],
        [-0.2   ,  0.    ,  0.2   ]],

       [[-0.2008, -0.0431,  0.0945],
        [-0.0746,  0.0928,  0.2329],
        [ 0.0636,  0.2349,  0.3713]]])
__init__(dist, theta=2.0)[source]
Args:
dist (Distribution):

The distribution to wrap

theta (float):

Copula parameter. Required to be above 0.

Methods

pdf(x_data[, decompose, allow_approx, step_size])

Probability density function.

cdf(x_data)

Cumulative distribution function.

fwd(x_data)

Forward Rosenblatt transformation.

inv(q_data[, max_iterations, tollerance])

Inverse Rosenblatt transformation.

sample([size, rule, antithetic, ...])

Create pseudo-random generated samples.

mom(K[, allow_approx])

Raw statistical moments.

ttr(kloc)

Three terms relation's coefficient generator.

Attributes

interpret_as_integer

Flag indicating that return value from the methods sample, and inv should be interpreted as integers instead of floating point.

lower

Lower bound for the distribution.

stochastic_dependent

True if distribution contains stochastically dependent components.

upper

Upper bound for the distribution.