ParameterScaler#
- class lumopt2.optimizer.base_optimizer.ParameterScaler(bounds: List[tuple], target_range: str = 'centered')#
Scales parameters between physical and normalized spaces.
This class provides consistent parameter scaling for optimizers that work better with normalized parameters. It supports two target ranges: - ‘unit’: [0, 1] - typical for Bayesian optimization - ‘centered’: [-1, 1] - typical for most other optimizers
- Parameters:
- Attributes:
- bounds_lower
np.ndarray Lower bounds in physical space.
- bounds_upper
np.ndarray Upper bounds in physical space.
- ranges
np.ndarray Parameter ranges (upper - lower).
- target_range
str The target range (‘unit’ or ‘centered’).
- bounds_lower
Methods
ParameterScaler.to_physical(scaled_params[, ...])Convert scaled parameters back to physical space.
ParameterScaler.to_scaled(params)Convert physical parameters to scaled space.
Attributes
Return bounds in scaled space.