gemseo.uncertainty.distributions.openturns.distribution module#
The interface to OpenTURNS-based probability distributions.
- class OTDistribution(interfaced_distribution='Uniform', parameters=(), standard_parameters=mappingproxy({}), transformation='', lower_bound=None, upper_bound=None, threshold=0.5)[source]#
Bases:
BaseDistribution
[float
,tuple
[Any
, ...],DistributionImplementation
],ScalarDistributionMixin
An OpenTURNS-based probability distribution.
Warning
The probability distribution parameters must be provided according to the signature of the OpenTURNS classes. Access the OpenTURNS documentation.
Examples
>>> from gemseo.uncertainty.distributions.openturns.distribution import ( ... OTDistribution, ... ) >>> distribution = OTDistribution("Exponential", (3, 2)) >>> print(distribution) Exponential(3, 2)
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
interfaced_distribution (str) --
The name of the probability distribution, typically the name of a class wrapped from an external library, such as
"Normal"
for OpenTURNS or"norm"
for SciPy.By default it is set to "Uniform".
parameters (tuple[Any, ...]) --
The parameters of the probability distribution.
By default it is set to ().
standard_parameters (StandardParametersType) --
The parameters of the probability distribution used for string representation only (use
parameters
for computation). If empty, useparameters
instead. For instance, let us consider the interfaced OpenTURNS distribution"Dirac"
. Then, the string representation ofOTDistribution("x", "Dirac", (1,), 1, {"loc": 1})
is"Dirac(loc=1)"
while the string representation ofOTDistribution("x", "Dirac", (1,))
is"Dirac(1)"
.By default it is set to {}.
transformation (str) --
A transformation applied to the random variable, e.g. \(\sin(x)\). If empty, no transformation.
By default it is set to "".
lower_bound (float | None) -- A lower bound to truncate the probability distribution. If
None
, no lower truncation.upper_bound (float | None) -- An upper bound to truncate the probability distribution. If
None
, no upper truncation.threshold (float) --
A threshold in [0,1] (see OpenTURNS documentation).
By default it is set to 0.5.
- JOINT_DISTRIBUTION_CLASS#
alias of
OTJointDistribution