Copula

Copula Class

Methods

class Copula(ordered_parameters=None, **kwargs)[source]

Define a copula for a multivariate distribution whose dependence structure is defined with a copula. This class is used in support of the JointCopula class.

Parameters:
  • ordered_parameters (Optional[dict]) – List of parameter names

  • kwargs (dict) – Parameters of the copula.

get_parameters()[source]
Return type:

dict

Returns:

A dictionary containing the parameter names.

update_parameters(**kwargs)[source]

Given a dictionary with keys the names and values the new parameter values, the method updates the current values.

Parameters:

kwargs (dict) – Dictionary containing the updated parameter values.

static check_marginals(marginals)[source]

Perform some checks on the marginals, raise errors if necessary.

As an example, Archimedian copulas are only defined for bi-variate continuous distributions, thus this method checks that marginals is of length 2 and continuous, and raise an error if that is not the case.

Parameters:

marginals (Union[list, DistributionContinuous1D]) – List of 1D continuous distributions.

Attributes

Copula.parameters: dict

Parameters of the copula.

Copula.ordered_parameters: dict

List of parameter names


List of Copulas

Clayton

Clayton copula having cumulative distribution function

\[F(u_1, u_2) = \max(u_1^{-\Theta} + u_2^{-\Theta} - 1, 0)^{-1/{\Theta}}\]

where \(u_1 = F_1(x_1), u_2 = F_2(x_2)\) are uniformly distributed on the interval [0, 1].

The Clayton class is imported using the following command:

>>> from UQpy.distributions.copulas.Clayton import Clayton
class Clayton(theta)[source]
Parameters:

theta (float) – Parameter of the Clayton copula, real number in \([1, +\infty)\)

evaluate_cdf(unit_uniform_samples)[source]

Compute the copula cdf \(C(u_1, u_2, ..., u_d)\) for a d-variate uniform distribution.

For a generic multivariate distribution with marginal cdfs \(F_1, ..., F_d\) the joint cdf is computed as:

\(F(x_1, ..., x_d) = C(u_1, u_2, ..., u_d)\)

where \(u_i = F_i(x_i)\) is uniformly distributed. This computation is performed in the JointCopula.cdf() method.

Parameters:

unit_uniform_samples (ndarray) – Points (uniformly distributed) at which to evaluate the copula cdf, must be of shape (npoints, dimension).

Return type:

ndarray

Returns:

Values of the cdf.

parameters: dict

Parameters of the copula.

ordered_parameters: dict

List of parameter names


Frank

Frank copula having cumulative distribution function

\(F(u_1, u_2) = -\dfrac{1}{\Theta} \log(1+\dfrac{(\exp(-\Theta u_1)-1)(\exp(-\Theta u_2)-1)}{\exp(-\Theta)-1})\)

where \(u_1 = F_1(x_1), u_2 = F_2(x_2)\) are uniformly distributed on the interval [0, 1].

The Frank class is imported using the following command:

>>> from UQpy.distributions.copulas.Frank import Frank
class Frank(theta)[source]
Parameters:

theta (float) – Parameter of the copula, real number in \(\mathbb{R}\)

evaluate_cdf(unit_uniform_samples)[source]

Compute the copula cdf \(C(u_1, u_2, ..., u_d)\) for a d-variate uniform distribution.

For a generic multivariate distribution with marginal cdfs \(F_1, ..., F_d\) the joint cdf is computed as:

\(F(x_1, ..., x_d) = C(u_1, u_2, ..., u_d)\)

where \(u_i = F_i(x_i)\) is uniformly distributed. This computation is performed in the JointCopula.cdf() method.

Parameters:

unit_uniform_samples (ndarray) – Points (uniformly distributed) at which to evaluate the copula cdf, must be of shape (npoints, dimension).

Return type:

ndarray

Returns:

Values of the cdf.

parameters: dict

Parameters of the copula.

ordered_parameters: dict

List of parameter names


Gumbel

Gumbel copula having cumulative distribution function

\[F(u_1, u_2) = \exp(-(-\log(u_1))^{\Theta} + (-\log(u_2))^{\Theta})^{1/{\Theta}}\]

where \(u_1 = F_1(x_1), u_2 = F_2(x_2)\) are uniformly distributed on the interval [0, 1].

The Gumbel class is imported using the following command:

>>> from UQpy.distributions.collection.Gumbel import Gumbel
class Gumbel(theta)[source]
Parameters:

theta (Optional[float]) – Parameter of the Gumbel copula, real number in \([1, +\infty)\).

evaluate_cdf(unit_uniform_samples)[source]

Compute the copula cdf \(C(u_1, u_2, ..., u_d)\) for a d-variate uniform distribution.

For a generic multivariate distribution with marginal cdfs \(F_1, ..., F_d\) the joint cdf is computed as:

\(F(x_1, ..., x_d) = C(u_1, u_2, ..., u_d)\)

where \(u_i = F_i(x_i)\) is uniformly distributed. This computation is performed in the JointCopula.cdf() method.

Parameters:

unit_uniform_samples (ndarray) – Points (uniformly distributed) at which to evaluate the copula cdf, must be of shape (npoints, dimension).

Return type:

ndarray

Returns:

Values of the cdf.

evaluate_pdf(unit_uniform_samples)[source]

Compute the copula pdf \(c(u_1, u_2, ..., u_d)\) for a d-variate uniform distribution.

For a generic multivariate distribution with marginals pdfs \(f_1, ..., f_d\) and marginals cdfs \(F_1, ..., F_d\), the joint pdf is computed as:

\(f(x_1, ..., x_d) = c(u_1, u_2, ..., u_d) f_1(x_1) ... f_d(x_d)\)

where \(u_i = F_i(x_i)\) is uniformly distributed. This computation is performed in the JointCopula.pdf() method.

Parameters:

unit_uniform_samples (ndarray) – Points (uniformly distributed) at which to evaluate the copula pdf, must be of shape (npoints, dimension).

Return type:

ndarray

Returns:

Values of the copula pdf term.

parameters: dict

Parameters of the copula.

ordered_parameters: dict

List of parameter names