Why does model think the next value is anomaly when current value is anomaly usually?

When i watch the result chart after htm.core model is finish the anomaly detect work, i find lot mistask on raw_anomaly_scores that often appeal after an outlier. Is it a matter of parameters? Which parameter affects the mistake?

the blue line and yellow line is value; the red line is raw_anomaly_score

1 Like

Hi @HUI_HUI, welcome!

How many times is this pattern shown above repeated?
It looks highly periodic, so it shouldn’t take many repetitions of the pattern for TM to learn it.

If the anomaly scores haven’t settled down after a few repeats I’d look at the encoding parameters, and make sure they make sense given the distribution of your values. For example, if the values for one metric tend to fall around 80-120 mostly, it wouldn’t make sense if the encoder min & max were 0 & 1.

So first thing I’d do is ensure that the pattern repeats several times for TM to learn, and then make sure the encoding params match the raw data distribution. In my experience, the problem is most likely to be one of these rather than any TM parameter.