gemseo / uncertainty / distributions / scipy

Show inherited members

composed module

The SciPy-based joint probability distribution.

SPComposedDistribution is a ComposedDistribution based on the SciPy library.

Warning

For the moment, there is no copula that can be used with SPComposedDistribution; if you want to introduce dependency between random variables, please consider OTComposedDistribution.

class gemseo.uncertainty.distributions.scipy.composed.SPComposedDistribution(distributions, copula=None, variable='')[source]

Bases: ComposedDistribution

The SciPy-based joint probability distribution.

Parameters:
  • distributions (Sequence[SPDistribution]) – The marginal distributions.

  • copula (None) – A copula distribution defining the dependency structure between random variables; if None, consider an independent copula.

  • variable (str) –

    The name of the variable, if any; otherwise, concatenate the names of the random variables defined by distributions.

    By default it is set to “”.

Raises:

NotImplementedError – When the copula is not None.

compute_cdf(vector)[source]

Evaluate the cumulative density function (CDF).

Evaluate the CDF of the components of the random variable for a given realization of this random variable.

Parameters:

vector (Iterable[float]) – A realization of the random variable.

Returns:

The CDF values of the components of the random variable.

Return type:

ndarray

compute_inverse_cdf(vector)[source]

Evaluate the inverse of the cumulative density function (ICDF).

Parameters:

vector (Iterable[float]) – A vector of values comprised between 0 and 1 whose length is equal to the dimension of the random variable.

Returns:

The ICDF values of the components of the random variable.

Return type:

ndarray

dimension: int

The number of dimensions of the random variable.

distribution: type

The probability distribution of the random variable.

distribution_name: str

The name of the probability distribution.

marginals: list[type]

The marginal distributions of the components of the random variable.

math_lower_bound: ndarray

The mathematical lower bound of the random variable.

math_upper_bound: ndarray

The mathematical upper bound of the random variable.

num_lower_bound: ndarray

The numerical lower bound of the random variable.

num_upper_bound: ndarray

The numerical upper bound of the random variable.

parameters: tuple[Any] | dict[str, Any]

The parameters of the probability distribution.

standard_parameters: dict[str, str] | None

The standard representation of the parameters of the distribution, used for its string representation.

transformation: str

The transformation applied to the random variable, e.g. ‘sin(x)’.

variable_name: str

The name of the random variable.