Parameter¶
-
class
uncertainpy.
Parameter
(name, value=None, distribution=None)[source]¶ Parameter object, contains name of parameter, value of parameter and distribution of parameter.
Parameters: - name (str) – Name of the parameter.
- value (float, int, None) – The fixed value of the parameter. If you give a parameter a distribution, in most cases you do not need to give it a fixed value.
- distribution ({None, Chaospy distribution, Function that returns a Chaospy distribution}, optional) – The distribution of the parameter. A parameter is considered uncertain if it has a distribution. Defaults to None.
Variables: - name (str) – Name of the parameter.
- value (float, int) – The value of the parameter.
- distribution (uncertainpy.Parameter.distribution) – The distribution of the parameter. A parameter is considered uncertain if it has a distribution.
-
__str__
()[source]¶ Return a readable string describing the parameter.
Returns: A string containing name
,value
, and if a parameter is uncertain.Return type: str
-
distribution
¶ A Chaospy distribution or a function that returns a Chaospy distribution. If None the parameter has no distribution and is not considered uncertain.
Parameters: distribution ({None, Chaospy distribution, callable that returns a Chaospy distribution}, optional) – The distribution of the parameter, used if the parameter is uncertain If it is a callable that returns a Chaospy distribution, the function sends value value to the function. Defaults to None. Returns: distribution – The distribution of the parameter, if None the parameter has no distribution and is not considered uncertain. Return type: {Chaospy distribution, None}