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

tdigest overview #214

Merged
merged 2 commits into from
Oct 29, 2024
Merged

tdigest overview #214

merged 2 commits into from
Oct 29, 2024

Conversation

AlexanderSaydakov
Copy link
Contributor

The page is not discoverable yet. Let's add to the navigation after checking on the web site.

Copy link
Contributor

@jmalkin jmalkin left a comment

Choose a reason for hiding this comment

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

Request a few minor changes but approving since they're small enough I don't need to re-review

The implementation in this library has a few differences from the reference implementation:

* merge does not modify the input
* different serialization similar to other sketches in this library, reading the reference implementation format is supported
Copy link
Contributor

Choose a reason for hiding this comment

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

I think remove different and add a transition:
serialization similar to other sketches in this library, although reading the reference implementation format is supported

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree


The closest alternative to t-digest in this library is [REQ sketch](https://datasketches.apache.org/docs/REQ/ReqSketch.html). 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).

The more input values t-digest observes the more it tends to be biased (tends to underestimate low ranks and overestimate high ranks):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth noting that it does that while still doing very well at the actual extremes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps, we could soften this statement a bit. How about:
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.

Copy link
Contributor

Choose a reason for hiding this comment

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

That works for me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented

@AlexanderSaydakov AlexanderSaydakov merged commit 7e31956 into master Oct 29, 2024
4 checks passed
@AlexanderSaydakov AlexanderSaydakov deleted the tdigest branch October 29, 2024 20:58
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.

2 participants