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

Can you implement Hoeffding Bound function #283

Closed
vkuznet opened this issue Jan 8, 2020 · 4 comments
Closed

Can you implement Hoeffding Bound function #283

vkuznet opened this issue Jan 8, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@vkuznet
Copy link

vkuznet commented Jan 8, 2020

Is your feature request related to a problem? Please describe.
We would like to perform statistical analysis of time series using Hoeffding Bound function, see https://www.youtube.com/watch?v=6UwcqiNsZ8U&feature=youtu.be&t=1237
Since it is general type function which can be applied to any metric it would be nice to have in VM.

@hagen1778 hagen1778 added the enhancement New feature or request label Jan 9, 2020
valyala added a commit that referenced this issue Jan 11, 2020
…fding_bound_lower(phi, m[d])` functions

These functions can be used for calculating Hoeffding bounds
for `m` over `d` time range and for the given `phi` in the range `[0..1]`.

Updates #283
valyala added a commit that referenced this issue Jan 11, 2020
…fding_bound_lower(phi, m[d])` functions

These functions can be used for calculating Hoeffding bounds
for `m` over `d` time range and for the given `phi` in the range `[0..1]`.

Updates #283
@valyala
Copy link
Collaborator

valyala commented Jan 11, 2020

@vkuznet , the commit 8b14572 adds the following functions:

  • hoeffding_bound_upper(phi, m[d]) - returns upper bound for values from m time series over duration d for phi in the range [0..1] (phi=0 returns values equal to avg_over_time(m[d])).
  • hoeffding_bound_lower(phi, m[d]) - returns lower bound for values from m time series over duration d for phi in the range [0..1] (phi=0 returns values equal to avg_over_time(m[d])).

For example, the following query would return data points for x, which exceed 99.9% Hoeffding bound calculated over data points from the last minute:

x > hoeffding_bound_upper(0.999, x[1m])

Could you verify whether these functions are properly implemented (see commit 8b14572 ) and whether they match your needs? You can build VictoriaMetrics from this commit using these instructions.

@vkuznet
Copy link
Author

vkuznet commented Jan 14, 2020

I was able to build, deploy and run few queries with this patch. Everything looks fine, but I don't have enough statistics in my dev Prometheus instance and for production we need an official docker image. Can you build and tag one that we can use? So far, we used image: victoriametrics/victoria-metrics.

@valyala
Copy link
Collaborator

valyala commented Jan 14, 2020

Can you build and tag one that we can use? So far, we used image: victoriametrics/victoria-metrics.

I'm planning to publish the next release with hoeffding_bound_* functions in the next few days.

@valyala
Copy link
Collaborator

valyala commented Jan 16, 2020

@vkuznet , hoeffding_bound_* functions are available starting from v1.32.3.

Closing this issue as resolved. Feel free re-opening it if the current implementation of hoeffding_bound_* functions works incorrectly.

@valyala valyala closed this as completed Jan 16, 2020
valyala added a commit that referenced this issue Feb 25, 2022
* fixes incorrect step for calculation for MovingWindow functions
https://victoriametrics.zendesk.com/agent/tickets/99

* wip

* wip

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
valyala added a commit that referenced this issue Feb 25, 2022
* fixes incorrect step for calculation for MovingWindow functions
https://victoriametrics.zendesk.com/agent/tickets/99

* wip

* wip

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants