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: ParameterBase

Scalar parameter bounded by a lower and upper limit.

Parameters:
namestr

Unique parameter name.

parameter_type{int, float}

Scalar domain. int accepts integral values only (no booleans); float accepts 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. None means 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_values before being written to the evaluation object.

denormalize(value: float) float[source]#

Map value from the normalized space back to [lb, ub].

normalize(value: float) float[source]#

Map value from [lb, ub] to the normalized space.

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 the numbers abstract base classes; rejects bool when parameter_type is int).

ValueError

If value lies outside [lb, ub].