Parameter¶
abc
¶
Abstract base class for parameters.
ParameterABC
¶
Bases: ModuleABC
Abstract base class for parameters.
sample()
abstractmethod
¶
Sample a value from the parameter.
Returns:
| Type | Description |
|---|---|
Float64NDArray
|
A sampled value from the parameter. |
Source code in src/flepimop2/parameter/abc/__init__.py
17 18 19 20 21 22 23 24 | |
build(config)
¶
Build a ParameterABC from a configuration dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any] | ModuleModel
|
Configuration dictionary or a |
required |
Returns:
| Type | Description |
|---|---|
ParameterABC
|
The constructed parameter instance. |
Source code in src/flepimop2/parameter/abc/__init__.py
27 28 29 30 31 32 33 34 35 36 37 38 | |
fixed
¶
Fixed parameter implementation.
FixedParameter
¶
Bases: ModuleModel, ParameterABC
Parameter with a fixed value.
Examples:
>>> from flepimop2.parameter.fixed import FixedParameter
>>> param = FixedParameter(value=42.0)
>>> param.sample()
array([42.])
sample()
¶
Return the fixed value of the parameter.
Returns:
| Type | Description |
|---|---|
Float64NDArray
|
The fixed numeric value of the parameter. |
Source code in src/flepimop2/parameter/fixed/__init__.py
29 30 31 32 33 34 35 36 | |