welch / tdigest

tdigest: javascript implementation of Dunning's T-Digest for streaming quantile approximation
MIT License
68 stars 10 forks source link

fix weighting with Digest class #14

Open rcombs opened 3 months ago

rcombs commented 3 months ago

Previously, the Digest class didn't support passing weights to the push routine. There doesn't appear to have been any reason for this.

welch commented 3 months ago

good catch! would you add a test or two for the change?

rcombs commented 3 months ago

There don't seem to be any tests for the weight arg at all, so maybe it'd be best to start there? Not sure exactly what the best tests for this would look like, though.