-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 standard deviation / variance sampling to extended stats #49782
Conversation
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
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.
I'm not sure if the lower/upper bounds shouldn't be different between std population and sampling.
private static double stdDevSampling(int... vals) { | ||
return Math.sqrt(varianceSampling(vals)); | ||
} | ||
|
||
private static double variance(int... vals) { |
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.
This indirection is confusing. Can we replace the calls to variationPopulation
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.
Thank you for taking the time to implement this feature.
Generally, LGTM too.
Regarding upper and lower bounds, they are definitely different between population and sampling standard deviation. For the sake of completeness, I think they should be added too.
It would also be nice if the documentation could mention that the existing |
thanks for the feedback! I will make those changes. |
@elasticmachine test this please |
@elasticmachine test this please |
@costin, @csoulios I have added upper and lower bounds. @polyfractal I have added docs. Any other suggestions? |
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, thanks for pushing it over the finish line @imotov :)
…ic#49782) Per 49554 I added standard deviation sampling and variance sampling to the extended stats interface. Closes elastic#49554 Co-authored-by: Igor Motov <igor@motovs.org>
Thanks to @andrewjohnson2 for the PR and to @polyfractal and @csoulios for quick reviews! |
…4902) Relates: elastic/elasticsearch#49782 Co-authored-by: Russ Cam <russ.cam@elastic.co>
…4901) Relates: elastic/elasticsearch#49782 Co-authored-by: Russ Cam <russ.cam@elastic.co>
Per 49554 I added standard deviation sampling and variance sampling to the extended stats interface.
Closes #49554