regel / loudml

Loud ML is the first open-source AI solution for ICT and IoT automation
Other
297 stars 93 forks source link

Moving Average Operator Support #192

Open zurdofio opened 4 years ago

zurdofio commented 4 years ago

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

regel commented 4 years ago

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:

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.