ezmsg.sigproc.ewma#
Functions
- ewma_step(sample, zi, alpha, beta=None)[source]#
Do an exponentially weighted moving average step.
- Parameters:
- Returns:
alpha * sample + beta * zi
Classes
- class EWMATransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[EWMASettings,AxisArray,AxisArray,EWMAState]
- class EWMAUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[EWMASettings,AxisArray,AxisArray,EWMATransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
EWMASettings
- class EWMA_Deprecated(alpha, max_len)[source]#
Bases:
objectGrabbed these methods from https://stackoverflow.com/a/70998068 and other answers in that topic, but they ended up being slower than the scipy.signal.lfilter method. Additionally, compute and compute2 suffer from potential errors as the vector length increases and beta**n approaches zero.
- ewma_step(sample, zi, alpha, beta=None)[source]#
Do an exponentially weighted moving average step.
- Parameters:
- Returns:
alpha * sample + beta * zi
- class EWMA_Deprecated(alpha, max_len)[source]#
Bases:
objectGrabbed these methods from https://stackoverflow.com/a/70998068 and other answers in that topic, but they ended up being slower than the scipy.signal.lfilter method. Additionally, compute and compute2 suffer from potential errors as the vector length increases and beta**n approaches zero.
- class EWMATransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[EWMASettings,AxisArray,AxisArray,EWMAState]
- class EWMAUnit(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[EWMASettings,AxisArray,AxisArray,EWMATransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
EWMASettings