Skip to content

Bind HLL get_composite_estimate - #70

Open
jaideeppyne wants to merge 1 commit into
apache:mainfrom
jaideeppyne:feat/hll-composite-estimate
Open

jaideeppyne wants to merge 1 commit into
apache:mainfrom
jaideeppyne:feat/hll-composite-estimate

Conversation

@jaideeppyne

Copy link
Copy Markdown

Fixes #68.

get_estimate() is the HIP estimator. It is the more accurate of the two, and it can change with insertion order. The composite estimator is order-independent, and it is what a union uses once HIP can no longer be kept. C++ and Java already expose it. This binds the same method on both hll_sketch and hll_union.

The docstring matches the C++ note that this is the estimator for when order-independence matters, not a replacement for get_estimate().

The test builds the same items in opposite orders and checks that get_composite_estimate() agrees, and that hll_union.get_composite_estimate() matches get_result().get_composite_estimate().

Tests: python -m unittest tests.hll_test.

The composite estimator is order-independent. get_estimate() is the HIP
estimator and can change with insertion order.

This branch has not been deployed

No deployments
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.

Expose get_composite_estimate() on hll_sketch in the Python binding

1 participant