-
Notifications
You must be signed in to change notification settings - Fork 8
t-digest changes #58
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
Merged
Merged
t-digest changes #58
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d2d1039
Add get_PMF and get_CDF to t-digest, add t-digest docs, update tdiges…
jmalkin 9004004
fix typo in tdigest.rst
jmalkin b0d63c6
fix typo in tdigest_test.py
jmalkin bdb739d
Update tdigest.rst
jmalkin e2a48d2
fix link formatting
jmalkin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| t-digest | ||
| -------- | ||
|
|
||
| .. currentmodule:: datasketches | ||
|
|
||
| The implementation in this library is based on the MergingDigest described in | ||
| `Computing Extremely Accurate Quantiles Using t-Digests <https://arxiv.org/abs/1902.04023>`_ by Ted Dunning and Otmar Ertl. | ||
|
|
||
| The implementation in this library has a few differences from the reference implementation associated with that paper: | ||
|
|
||
| * Merge does not modify the input | ||
| * Derialization similar to other sketches in this library, although reading the reference implementation format is supported | ||
|
|
||
| Unlike all other algorithms in the library, t-digest is empirical and has no mathematical basis for estimating its error | ||
| and its results are dependent on the input data. However, for many common data distributions, it can produce excellent results. | ||
jmalkin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| t-digest also operates only on numeric data and, unlike the quantiles family algorithms in the library which return quantile | ||
| approximations from the input domain, t-digest interpolates values and will hold and return data points not seen in the input. | ||
|
|
||
| The closest alternative to t-digest in this library is REQ sketch. It prioritizes one chosen side of the rank domain: | ||
| either low rank accuracy or high rank accuracy. t-digest (in this implementation) prioritizes both ends of the rank domain | ||
| and has lower accuracy towards the middle of the rank domain (median). | ||
|
|
||
| Measurements show that t-digest is slightly biased (tends to underestimate low ranks and overestimate high ranks), while still | ||
| doing very well close to the extremes. The effect seems to be more pronounced with more input values. | ||
|
|
||
| For more information on the performance characteristics, see `the Datasketches page on t-digest <https://datasketches.apache.org/docs/tdigest/tdigest.html>`_. | ||
|
|
||
| .. autoclass:: tdigest_float | ||
| :members: | ||
| :undoc-members: | ||
| :exclude-members: deserialize | ||
|
|
||
| .. rubric:: Static Methods: | ||
|
|
||
| .. automethod:: deserialize | ||
|
|
||
| .. rubric:: Non-static Methods: | ||
|
|
||
| .. automethod:: __init__ | ||
|
|
||
| .. autoclass:: tdigest_double | ||
| :members: | ||
| :undoc-members: | ||
| :exclude-members: deserialize | ||
|
|
||
| .. rubric:: Static Methods: | ||
|
|
||
| .. automethod:: deserialize | ||
|
|
||
| .. rubric:: Non-static Methods: | ||
|
|
||
| .. automethod:: __init__ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.