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:
boundslist of tuple

Physical bounds as list of (min, max) tuples.

target_rangestr

Target range for scaling: ‘unit’ for [0, 1] or ‘centered’ for [-1, 1]. Default is ‘centered’.

Attributes:
bounds_lowernp.ndarray

Lower bounds in physical space.

bounds_uppernp.ndarray

Upper bounds in physical space.

rangesnp.ndarray

Parameter ranges (upper - lower).

target_rangestr

The target range (‘unit’ or ‘centered’).

Methods

ParameterScaler.to_physical(scaled_params[, ...])

Convert scaled parameters back to physical space.

ParameterScaler.to_scaled(params)

Convert physical parameters to scaled space.

Attributes

ParameterScaler.scaled_bounds

Return bounds in scaled space.