Skip to content

[hail] Adding approx median#7346

Merged
danking merged 3 commits intohail-is:masterfrom
johnc1231:johnc-approx-median
Oct 22, 2019
Merged

[hail] Adding approx median#7346
danking merged 3 commits intohail-is:masterfrom
johnc1231:johnc-approx-median

Conversation

@johnc1231
Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
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.

3 participants