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

Added the percentiles_rank aggregation #6386

Closed
jpountz opened this issue Jun 3, 2014 · 4 comments · Fixed by #6432
Closed

Added the percentiles_rank aggregation #6386

jpountz opened this issue Jun 3, 2014 · 4 comments · Fixed by #6432

Comments

@jpountz
Copy link
Contributor

jpountz commented Jun 3, 2014

The percentiles aggregation currently allows to return a percentile given a percentage. However, the data-structure that we are using under the hoods is also able to do the reverse operation: given a value, what percentage of the values from my dataset are below it?

For example, if you have a dataset of response times and provided it with a response time of 134 (ms), it would be able to tell you that this is the 72th percentile.

@colings86 colings86 self-assigned this Jun 3, 2014
@colings86
Copy link
Contributor

@jpountz Do you see this as a separate aggregation from the percentiles aggregation, a mode on the percentiles aggregation which can be switched on with a parameter (changing the role of the current percents parameter), or something that can be run alongside the percents parameter (so the user can specify percents and cdf values)?

@jpountz
Copy link
Contributor Author

jpountz commented Jun 3, 2014

I think it would be nice to be able to run it alongside the percents parameter?

@uboness
Copy link
Contributor

uboness commented Jun 3, 2014

+1

Re adding it to the existing percentiles agg, @jpountz, it's possible, but that would most definitely mean breaking the API (the response format at the minimum). Personally, I don't mind that, in fact, if we're already creating the data structure, better reuse it for both purposes.... just something to think about.

@jpountz
Copy link
Contributor Author

jpountz commented Jun 3, 2014

@uboness Good point. Another thing I'm wondering is how sorting would work if we expose the two metrics in a single aggregation (ie. what would keys look like?)

colings86 added a commit that referenced this issue Jun 18, 2014
Percentile Rank Aggregation is the reverse of the Percetiles aggregation.  It determines the percentile rank (the proportion of values less than a given value) of the provided array of values.

Closes #6386
@clintongormley clintongormley changed the title Aggregations: Expose the cumulative distribution function in the percentiles aggregation Aggregations: Added the percentiles_rank aggregation Jul 16, 2014
@clintongormley clintongormley changed the title Aggregations: Added the percentiles_rank aggregation Added the percentiles_rank aggregation Jun 6, 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 a pull request may close this issue.

4 participants