derrickburns / tdigest Goto Github PK
View Code? Open in Web Editor NEWC++ version of Ted Dunning's merging t-digest
License: Apache License 2.0
C++ version of Ted Dunning's merging t-digest
License: Apache License 2.0
This should be done in the following line:
Line 335 in 080dcc7
I don't know if you want anything we have in the Java code, but this is a tickler to have a look.
I just found some insidious issues relative to repeated counts that you may care about. If you have a stable sort, these may not have impacted you.
Would it be possible to choose a license for this project and add a LICENSE file?
Hi!
I would like to compute quantiles for data of mine and stumbled over this. I browsed through the code but have really no idea, how I can compute quantiles. Would you have a quick guide, what functions to call or classes to instantiate to get a number of quantiles from a data set?
The following test case reproduces the problem:
TEST_F(TDigestTest, CrashAfterMerge) {
tdigest::TDigest digest(1000);
std::uniform_real_distribution<> reals(0.0, 1.0);
std::random_device gen;
for (int i = 0; i < 100000; i++) {
digest.add(reals(gen));
}
digest.compress();
tdigest::TDigest digest2(1000);
digest2.merge(&digest);
digest2.quantile(0.5);
}
From my debugging, it seems the crash happens in line 338, because the cumulative_ structure is empty after the merge. Adding a call to updateCumulative() at the end of merge() fixes the crash.
Some background: I was using your implementation in a distributed setting, were partial results are serialized, and sent to a central node, where they are deserialized and merged into one result. The above test case simulates this and also triggers the crash (so the serialization is not the problem). Maybe the call to compress() is just wrong, but it instinctively seemed correct to compress before serialization ;-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.