ExpScaler¶
- final class ExpScaler¶
Bases:
DataTransformerExponential scaling method.
- The scaling is defined as:
y_scaled = -exp(-(y - y_offset) / c_m)
- where:
y_offset = min(y): Minimum value in the data
c_m: Calculated based on cm_method from (y - y_offset)
- Parameters:
dynamic (bool) – If True, recalculates scaling parameters (y_offset, c_m) every time transform() is called. If False, calculates them only once on the first call. Default is False.
cm_method (CmMethod | Literal["mean", "median"]) – Method to calculate c_m from the data. Options are: - “mean”: Use mean of (y - y_offset) - “median”: Use median of (y - y_offset) Default is “mean”.
Methods
- class CmMethod¶
Bases:
EnumMethod to calculate c_m for exponential scaling.
- MEAN = 'mean'¶
- MEDIAN = 'median'¶
- __abstractmethods__ = frozenset({})¶
- __dict__ = mappingproxy({'__module__': 'amplify_bbopt.data_transformer', '__doc__': 'Exponential scaling method.\n\n The scaling is defined as:\n y_scaled = -exp(-(y - y_offset) / c_m)\n where:\n - y_offset = min(y): Minimum value in the data\n - c_m: Calculated based on cm_method from (y - y_offset)\n\n Args:\n dynamic (bool): If True, recalculates scaling parameters (y_offset, c_m) every time\n transform() is called. If False, calculates them only once on the first call.\n Default is False.\n cm_method (CmMethod | Literal["mean", "median"]):\n Method to calculate c_m from the data. Options are:\n - "mean": Use mean of (y - y_offset)\n - "median": Use median of (y - y_offset)\n Default is "mean".\n ', 'CmMethod': <enum 'CmMethod'>, '__init__': <function ExpScaler.__init__>, '_scale_y': <function ExpScaler._scale_y>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '__annotations__': {'_cm_method': 'ExpScaler.CmMethod', '_c_m': 'float | None', '_y_offset': 'float | None'}})¶
- __slots__ = ()¶
- __weakref__¶
list of weak references to the object (if defined)