Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is non empty version of 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
>>>
quantile 0.99 (tdigest (1 :| [2..1000]) :: TDigest 25)
990.5
>>>
quantile 0.99 (tdigest (1 :| [2..1000]) :: TDigest 3)
989.0...
t-Digest is more precise in tails, especially median is imprecise:
>>>
median (forceCompress $ tdigest (1 :| [2..1000]) :: TDigest 25)
497.6...
Synopsis
- data TDigest comp
- tdigest :: (Foldable1 f, KnownNat comp) => f Double -> TDigest comp
- singleton :: KnownNat comp => Double -> TDigest comp
- insert :: KnownNat comp => Double -> TDigest comp -> TDigest comp
- insert' :: KnownNat comp => Double -> TDigest comp -> TDigest comp
- compress :: forall comp. KnownNat comp => TDigest comp -> TDigest comp
- forceCompress :: forall comp. KnownNat comp => TDigest comp -> TDigest comp
- totalWeight :: TDigest comp -> Weight
- minimumValue :: TDigest comp -> Mean
- maximumValue :: TDigest comp -> Mean
- median :: TDigest comp -> Double
- quantile :: Double -> TDigest comp -> Double
- mean :: TDigest comp -> Double
- variance :: TDigest comp -> Double
- stddev :: TDigest comp -> Double
- cdf :: Double -> TDigest comp -> Double
- icdf :: Double -> TDigest comp -> Double
- size :: TDigest comp -> Int
- valid :: TDigest comp -> Bool
- validate :: TDigest comp -> Either String (TDigest comp)
- debugPrint :: TDigest comp -> IO ()
Construction
Instances
Population
Compression
Statistics
totalWeight :: TDigest comp -> Weight Source #
minimumValue :: TDigest comp -> Mean Source #
maximumValue :: TDigest comp -> Mean Source #
Percentile
Mean & variance
CDF
Debug
debugPrint :: TDigest comp -> IO () Source #