Add supports for upper and lower values on boxplot based on the IQR value#63617
Merged
not-napoleon merged 11 commits intoelastic:masterfrom Nov 4, 2020
Merged
Add supports for upper and lower values on boxplot based on the IQR value#63617not-napoleon merged 11 commits intoelastic:masterfrom
not-napoleon merged 11 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
Conflicts: x-pack/plugin/analytics/src/test/java/org/elasticsearch/xpack/analytics/boxplot/InternalBoxplotTests.java
imotov
approved these changes
Nov 3, 2020
| public class InternalBoxplot extends InternalNumericMetricsAggregation.MultiValue implements Boxplot { | ||
|
|
||
| enum Metrics { | ||
| MIN { |
| double q1 = state.quantile(0.25); | ||
| double iqr = q3 - q1; | ||
| double upper = q3 + (1.5 * iqr); | ||
| double lower = q1 - (1.5 * iqr); |
Contributor
There was a problem hiding this comment.
I think it might be a good idea to make this a constant and give it a short explanation....
Member
Author
|
@elasticmachine update branch |
not-napoleon
added a commit
to not-napoleon/elasticsearch
that referenced
this pull request
Nov 4, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #60466
This PR expands the functionality of the box plot aggregation to support an upper and lower "whisker" value based on the inter-quartile range. In theory, the upper whisker should be the highest observed value less than or equal to Q3 + (1.5 * IQR), and the lower bound should be the lowest observed value greater than Q1 - (1.5 * IQR). Like all our quantile based aggregations, this will provide an approximation of those values, based on the centroids in the t-digest backing the aggregation.