Skip to content

Conversation

tveasey
Copy link
Contributor

@tveasey tveasey commented May 24, 2022

We have some code which affects the weighting we apply to outliers immediately after detecting a change in a time series. This is to deal with time series which flip-flop between values: we don't want to flag every change as anomalous, but rather learn the "envelope" of the changes. However, we need to be a bit more careful than we are with allowing the model to incorporate unusual values just after a change. If we get unlucky and there is a large outlier around this time it pollutes the model.

To address the flip-flop case we simply need to increase the weight of values whose prediction error is on the same scale as the change we detected. Values whose prediction error is significantly larger can be reweighted as normal. I noticed this while debugging #2276.

Before
Screenshot 2022-05-24 at 12 28 55

After
Screenshot 2022-05-24 at 12 28 42

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tveasey tveasey merged commit f810adb into elastic:main May 24, 2022
@tveasey tveasey deleted the outlier-after-change branch May 24, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants