triangular module¶
Class to create a triangular distribution from the OpenTURNS library.
This class inherits from OTDistribution
.
- class gemseo.uncertainty.distributions.openturns.triangular.OTTriangularDistribution(variable, minimum=0.0, mode=0.5, maximum=1.0, dimension=1, transformation=None, lower_bound=None, upper_bound=None, threshold=0.5)[source]
Bases:
OTDistribution
Create a triangular distribution.
Example
>>> from gemseo.uncertainty.distributions.openturns.triangular import ( ... OTTriangularDistribution ... ) >>> distribution = OTTriangularDistribution('x', -1, 0, 1) >>> print(distribution) Triangular(lower=-1, mode=0, upper=1)
- Parameters:
variable (str) – The name of the triangular random variable.
minimum (float) –
The minimum of the triangular random variable.
By default it is set to 0.0.
mode (float) –
The mode of the triangular random variable.
By default it is set to 0.5.
maximum (float) –
The maximum of the random variable.
By default it is set to 1.0.
dimension (int) –
The dimension of the triangular random variable.
By default it is set to 1.
transformation (str | None) – A transformation applied to the random variable, e.g. ‘sin(x)’. If None, no transformation.
lower_bound (float | None) – A lower bound to truncate the distribution. If None, no lower truncation.
upper_bound (float | None) – An upper bound to truncate the distribution. If None, no upper truncation.
threshold (float) –
A threshold in [0,1].
By default it is set to 0.5.
- dimension: int
The number of dimensions of the random variable.
- distribution_name: str
The name of the probability distribution.
- marginals: list[ot.Distribution]
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.
- 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.