I am gathering data from the sensors and the data is more or less a time series data and I am gathering the number of counts being generated every minute and the number of data points is 1440 (So I am keeping in mind that my data is already aggregated). I want to raise an anomaly whenever the number of counts is more than expected value.
for example, my sensor sends data between 9 am to 10 am and it send data every 5 seconds (12 in a minute), so if the sensor sends the data more than that or less than that then I should raise an anomaly(I also want to consider the std. deviation, but this is not a big concern as of now and can be solved later on). I have tried SAX and other techniques but it doesn't seem to work in my case.
I have attached the graph with and without anomaly.
And when the device has different behaviour like it behaves differently after every five minutes then the machine should learn it's behaviour and should not throw anomaly, but when the graph is similar and the number of counts is different then it should throw anomaly.
case1: [number of count for 30 minutes for every 5 minutes: {2,4,10, 20,4,6}
case2: [number of count for 30 minutes for every 5 minutes: {4,8,20, 40,8,12}
{4,8,20, 40,8,12}
Both are different.
I have attached the graphs for the same also, which algorithm should I follow which solves both the problems.