HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduletdigest-0.3.1Haskell2010

Data.TDigest.Tree.NonEmpty

This is non empty version of Data.TDigest.TDigest, i.e. this is not a Monoid, but on the other hand, quantile returns Double not Maybe Double.

See Data.TDigest for documentation. The exports should be similar, sans non-Maybe results.

Examples
Example1 expression
quantile 0.99 (tdigest (1 :| [2..1000]) :: TDigest 25)990.5
Example1 expression
quantile 0.99 (tdigest (1 :| [2..1000]) :: TDigest 3)989.0...

t-Digest is more precise in tails, especially median is imprecise:

Example1 expression
median (forceCompress $ tdigest (1 :| [2..1000]) :: TDigest 25)497.6...
Contents
  1. Construction
  2. Population
  3. Compression
  4. Statistics
  5. Percentile
  6. Mean & variance
  7. CDF
  8. Debug
Synopsis
  • Packagetdigest-0.3.1
  • Exports21
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceNonEmpty.hs

Construction

newtypenewtype TDigest (comp :: Nat)
#
Instances6Reducer, Show, Semigroup, NFData, Binary, HasHistogram

Population

Compression

Statistics

Percentile

Mean & variance

CDF

Debug