ezmsg.sigproc.scaler#
Adaptive standard scaling using exponentially weighted moving statistics.
Functions
- scaler(time_constant=1.0, axis=None)[source]#
Create a
RiverAdaptiveStandardScalerTransformerwith the given parameters.- Parameters:
- Return type:
Classes
- class AdaptiveStandardScaler(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[AdaptiveStandardScalerSettings,AxisArray,AxisArray,AdaptiveStandardScalerTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
AdaptiveStandardScalerSettings
- INPUT_ACCUMULATE = InputStream:unlocated[bool]()#
- class AdaptiveStandardScalerSettings(time_constant: float = 1.0, axis: str | None = None, accumulate: bool = True)[source]#
Bases:
EWMASettings
- class AdaptiveStandardScalerState[source]#
Bases:
object- samps_ewma: EWMATransformer | None = None#
- vars_sq_ewma: EWMATransformer | None = None#
- class AdaptiveStandardScalerTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[AdaptiveStandardScalerSettings,AxisArray,AxisArray,AdaptiveStandardScalerState]- update_settings(new_settings)[source]#
Apply new settings to this processor, requesting a state reset if needed.
Diffs
new_settingsagainst the currentself.settings. If every changed field is listed inNONRESET_SETTINGS_FIELDS,self.settingsis simply rebound and the processor keeps running. Otherwise,_request_reset()is called so the next message triggers a fresh_reset_state(for stateful subclasses). Override for finer-grained control than the class-level allow-list provides.- Parameters:
new_settings (AdaptiveStandardScalerSettings)
- Return type:
None
- class RiverAdaptiveStandardScalerSettings(time_constant: float = 1.0, axis: str | None = None)[source]#
Bases:
Settings
- class RiverAdaptiveStandardScalerTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[RiverAdaptiveStandardScalerSettings,AxisArray,AxisArray,RiverAdaptiveStandardScalerState]Apply the adaptive standard scaler from river.
This processes data sample-by-sample using River’s online learning implementation. For a vectorized EWMA-based alternative, see
AdaptiveStandardScalerTransformer.