-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add supports for upper and lower values on boxplot based on the IQR value #63617
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
Conversation
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
Conflicts: x-pack/plugin/analytics/src/test/java/org/elasticsearch/xpack/analytics/boxplot/InternalBoxplotTests.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -25,8 +27,83 @@ | |||
public class InternalBoxplot extends InternalNumericMetricsAggregation.MultiValue implements Boxplot { | |||
|
|||
enum Metrics { | |||
MIN { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
double q1 = state.quantile(0.25); | ||
double iqr = q3 - q1; | ||
double upper = q3 + (1.5 * iqr); | ||
double lower = q1 - (1.5 * iqr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be a good idea to make this a constant and give it a short explanation....
@elasticmachine update branch |
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.