welch / tdigest

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

fix weighting with Digest class #14

Open rcombs opened 7 months ago

rcombs commented 7 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 7 months ago

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

rcombs commented 7 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.