Skip to content

Conversation

tveasey
Copy link
Contributor

@tveasey tveasey commented May 3, 2018

Investigating a forecasting regression associated with changes targeting #87 showed up an issue with the way we age periodically repeating partitions of the data (such as weekday/end splits). In particular, we were ageing them too fast and their decay rate should be prorated by the fraction of values with which they are updated. For subtle reasons, related to interaction between components in the decomposition, this could lead to biased predictions.

This can affect results for metric and count analyses when the data has distinct weekday/end repeating pattern.

@@ -240,6 +240,7 @@ void CSeasonalComponentAdaptiveBucketing::propagateForwardsByTime(double time, b
if (time < 0.0) {
LOG_ERROR(<< "Can't propagate bucketing backwards in time");
} else if (this->initialized()) {
time *= m_Time->fractionInWindow();

Choose a reason for hiding this comment

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

nit: would be cleaner to simply do that on the next line without changing an input parameter

@hendrikmuhs
Copy link

LGTM, only misses the changelog I think.

@tveasey
Copy link
Contributor Author

tveasey commented May 4, 2018

Thanks @hendrikmuhs, I updated the change log and made your suggested change.

Copy link

@hendrikmuhs hendrikmuhs left a comment

Choose a reason for hiding this comment

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

LGTM

@hendrikmuhs
Copy link

@tveasey

Just to clarify, when you say "regression" in your description you mean regression w.r.t. an unreleased version?

@tveasey tveasey force-pushed the bug/correct-windowed-component-ageing branch from c72d88b to ea81db2 Compare May 4, 2018 11:02
@tveasey tveasey force-pushed the bug/correct-windowed-component-ageing branch from ea81db2 to ce6e71b Compare May 4, 2018 11:03
@tveasey
Copy link
Contributor Author

tveasey commented May 4, 2018

That's correct. Whilst evaluating changes related to #87, I noticed we were getting significantly worse forecasts in one of the unit tests. This turned out to be because we identified a weekday/end cyclic partition, which we didn't before. The fact that the results were worse was down to the problem this PR addresses.

@tveasey tveasey merged commit 1a76e62 into elastic:master May 4, 2018
tveasey added a commit that referenced this pull request May 22, 2018
In particular, we were ageing them too fast and their decay rate should be prorated by the 
fraction of values with which they are updated.
@tveasey tveasey deleted the bug/correct-windowed-component-ageing branch December 13, 2018 08:41
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