Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Holt-Winters to moving_avg aggregation #11043

Merged
merged 1 commit into from May 27, 2015

Conversation

polyfractal
Copy link
Contributor

Adds Holt-Winters model (aka triple exponential) to moving_avg aggregation. Holt-Winters has some finicky properties, so there were general changes to the agg to help make life easier:

  • Better settings hash parsing, such that proper SearchParsePhaseExceptions are thrown if the datatype is wrong, out of bounds, etc
  • Models can now implement hasNext() to determine if the model is capable of producing a new value. This is important for HW, which has a "cold start" phase at the beginning where it is incapable of producing values.
  • Simplified logic in the actual reduce() method

tracks the seasonal aspect of your data. This aggregation therefore smooths based on three components: "level", "trend"
and "seasonality".

The level and trend calculation is identical to `ewma` The seasonal calculation looks at the difference between
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be 'identical to the Holt-Linear'? isn't it Holt-Linear which smooths based on level and trend?

@colings86
Copy link
Contributor

@polyfractal left some comments but it looks pretty good

@polyfractal
Copy link
Contributor Author

@colings86 All tidied up :)

@colings86
Copy link
Contributor

LGTM

polyfractal added a commit that referenced this pull request May 27, 2015
Aggregations: Add Holt-Winters model to `moving_avg` pipeline aggregation
@polyfractal polyfractal merged commit 5acb40c into elastic:master May 27, 2015
@kevinkluge kevinkluge removed the review label May 27, 2015
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.

None yet

4 participants