Closed cboulay closed 7 months ago
I think I would like to see @consumer
moved out of the example pattern and directly into the core ezmsg before this is merged, then I can clean that out of the files in this PR.
At this point, I think I'm happy to add the generator utils to core.
Thanks for the changes to the generator code! I'll rebase and recreate this PR. I don't have time at the moment but I will get to it before Monday.
This branch uses the Generator pattern outlined in #55.
The implementation is based on River's AdaptiveStandardScaler. In fact, 2 implementations are provided and tested. The first,
scaler
, uses river directly (import is insidescaler
function). The second,scaler_np
, uses only numpy.The first is about twice as fast for single-channel data but
scaler_np
is at least twice as faster for multi-channel data.Either implementation is faster than the current EWM (at least in a 62-channel 500 Hz pipeline I was testing) and requires less memory.