loudml
loudml copied to clipboard
Moving Average Operator Support
Hi Sebastien how are you?
Are you planning to support Moving Average as metric operator?.
In models with a lot of variation between samples we can see fake anomalies that could be solved if we work with the moving average operator rather than sum(), for example.
Thanks Martin
Hey, good thanks!
In general, loudml relies on the bucket underlying aggregation operators.
In some instances, you can fine-tune bucket_interval
and span
parameters in the model definition. If the bucket interval is too low, high-frequency noise in the data will trigger false positives. If span (that is: the window of observation) is too low, the same thing will happen.
Helpful heuristics:
- Span window size should be at least equal to the periodicity in the signal
- Nyquist–Shannon sampling theorem: bucket interval should be smaller than 0.5 * 1/max_hz_frequency otherwise there will be a loss of information
So it's good to know the expected HZ and periodicity characteristics of the signal before setting parameters and training the model.
One nice enhancement in donut.py would be to set bucket_interval='auto', span='auto', compute the discrete FFT, and apply settings automatically according to the above heuristic if the parameters were not set by the user.