gemseo.uncertainty.distributions.scipy.distribution module#
The interface to SciPy-based probability distributions.
- class SPDistribution(interfaced_distribution='uniform', parameters=mappingproxy({}), standard_parameters=mappingproxy({}), settings=None)[source]#
Bases:
BaseDistribution[float,Mapping[str,Any],rv_continuous_frozen],ScalarDistributionMixinA SciPy-based probability distribution.
Warning
The distribution parameters must be provided according to the signature of the scipy classes. Access the scipy documentation.
Examples
>>> from gemseo.uncertainty.distributions.scipy.distribution import ( ... SPDistribution, ... ) >>> distribution = SPDistribution("expon", {"loc": 3, "scale": 1 / 2.0}) >>> print(distribution) expon(loc=3, scale=0.5)
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 (StrKeyMapping | 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
parametersfor computation). If empty, useparametersinstead. For instance, let us consider the interfaced SciPy distribution"uniform". Then, the string representation ofSPDistribution("uniform", parameters, 1, {"min": 1, "max": 3})withparameters={"loc": 1, "scale": 2}is"uniform(max=3, min=1)"while the string representation ofSPDistribution("uniform", parameters)is"uniform(loc=1, scale=2)".By default it is set to {}.
settings (SPDistribution_Settings | None) -- The settings of the distributions. If set, the other arguments are ignored. If
None, the other arguments are used instead.
- JOINT_DISTRIBUTION_CLASS#
alias of
SPJointDistribution
- Settings#
alias of
SPDistribution_Settings