piglot.parameter.ParameterSet
- class ParameterSet[source]
Bases:
objectContainer class for a set of parameters.
This type should be used if the internal optimised parameters and the output parameters are equal. By default, the internal names are used for output name resolution.
Methods
Add a parameter to this set.
Clamp the parameter set to the [lbound,ubound] interval.
Build the hash for the current parameter values.
Build a dict with name-value pairs given a list of values.
- add(name: str, inital_value: float, lbound: float, ubound: float) None[source]
Add a parameter to this set.
Parameters
- namestr
Parameter name.
- inital_valuefloat
Initial value for the parameter.
- lboundfloat
Lower bound of the parameter.
- uboundfloat
Upper bound of the parameter.
Raises
- RuntimeError
If a repeated parameter is given.
- clip(values: ndarray) ndarray[source]
Clamp the parameter set to the [lbound,ubound] interval.
Parameters
- valuesnp.ndarray
Values to clip. Their order is used for parameter resolution.
Returns
- np.ndarray
Clamped parameters.