@hackage tdigest0
On-line accumulation of rank-based statistics
Categories
License
BSD-3-Clause
Maintainer
Oleg Grenrus <oleg.grenrus@iki.fi>
Links
Versions
Installation
CustomTested Compilers
Dependencies (8)
- base >=4.7 && <4.10
- base-compat >=0.9.1 && <0.10
- binary >=0.7.1.0 && <0.9
- deepseq >=1.3.0.2 && <1.5
- reducers >=3.12.1 && <3.13
- semigroups >=0.18.2 && <0.19 Show all…
Dependents (17)
@hackage/wrecker, @hackage/online, @hackage/servant-http-streams, @hackage/mealy, @hackage/numhask-histogram, @hackage/tdigest-Chart, Show all…
tdigest
A new data structure for accurate on-line accumulation of rank-based statistics such as quantiles and trimmed means.
See original paper: "Computing extremely accurate quantiles using t-digest" by Ted Dunning and Otmar Ertl
Synopsis
λ *Data.TDigest > median (tdigest [1..1000] :: TDigest 3)
Just 499.0090729817737
Benchmarks
Using 50M exponentially distributed numbers:
- average: 16s; incorrect approximation of median, mostly to measure prng speed
- sorting using
vector-algorithms: 33s; using 1000MB of memory - sparking t-digest (using some
par): 53s - buffered t-digest: 68s
- sequential t-digest: 65s
Example histogram
tdigest-simple -m tdigest -d standard -s 100000 -c 10 -o output.svg -i 34
inkscape --export-png=example.png --export-dpi=80 --export-background-opacity=0 --without-gui example.svg
