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

[hail] Adding approx median #7346

Merged
merged 3 commits into from
Oct 22, 2019
Merged

Conversation

johnc1231
Copy link
Contributor

Just an alias for approx_quantiles(.5) but easier to find when searching for median and probably a very common operation.

Comment on lines +301 to +308
Examples
--------
Estimate the median of the `HT` field.

>>> table1.aggregate(hl.agg.approx_median(table1.HT)) # doctest: +SKIP_OUTPUT_CHECK
64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases like this, it seems valuable to me to actually document the implementation, to help people discover and learn the more general operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call 👍 I'll mention this is just a wrapper on approx_quantiles. Also, forgot to copy the documentation of what k does.

@danking danking merged commit 3cdc5b0 into hail-is:master Oct 22, 2019
@johnc1231 johnc1231 deleted the johnc-approx-median branch June 1, 2021 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants