0

I have a system that is constantly outputting numbers as a stream as follows:

943 83 593 448 90 391 728 901 83 4 ...

These numbers are unordered and allow repetition.

I want to use this stream to build a baseline for normal behavior using a running Modified Z score in Python as an online solution.

Majority of the solutions and discussions I have come across expect a pre-existing set of values to calculate the modified Z score. In my case, I am trying to look for a solution with the following features:

  • Calculate a modified Z score in an online manner, i.e. I treat a particular period of time as the learning phase where I use the incoming stream from the system to build my baseline.
  • Not store the data from the incoming stream to perform my calculations (not sure if this is actually feasible).

Would highly appreciate any help on this. Thanks.

Michael Westen
  • 169
  • 2
  • 10
  • As I understand, Modified Z-Score requires the median value and the median deviation. It is possible to find both medians for a running stream of values without storing all values (i.e. constant storage). [Check out the answers and linked question here](https://stackoverflow.com/questions/10930732/c-efficiently-calculating-a-running-median). – Aziz Jan 26 '22 at 14:42

0 Answers0