CADETProcess.parameter_space.RangedParameter#
- class CADETProcess.parameter_space.RangedParameter(name: str, parameter_type: type[int] | type[float] = <class 'float'>, lb: float = -inf, ub: float = inf, normalization: Literal['auto', 'linear', 'log'] | None=None, significant_digits: int | None = None)[source]#
Bases:
ParameterBaseScalar parameter bounded by a lower and upper limit.
- Parameters:
- namestr
Unique parameter name.
- parameter_type{int, float}
Scalar domain.
intaccepts integral values only (no booleans);floataccepts any real-valued scalar, including integers and NumPy real scalars.- lbfloat
Lower bound (inclusive). Defaults to
-inf.- ubfloat
Upper bound (inclusive). Defaults to
+inf.- normalization{“auto”, “linear”, “log”} or None
Normalization scheme.
Nonemeans no normalization (identity). Requires finite bounds when set.- significant_digitsint or None
When set, values are rounded to this many significant digits by
ParameterSpace.set_valuesbefore being written to the evaluation object.
- validate(value: Any) Any[source]#
Validate type and bounds.
Returns value unchanged.
- Raises:
- TypeError
If value is not numerically compatible with
parameter_type(accepts NumPy scalar types via thenumbersabstract base classes; rejectsboolwhenparameter_typeisint).- ValueError
If value lies outside
[lb, ub].