Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.TDigest.Tree.NonEmpty
Description
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 :: Nat)
- tdigest :: forall f (comp :: Nat). (Foldable1 f, KnownNat comp) => f Double -> TDigest comp
- singleton :: forall (comp :: Nat). KnownNat comp => Double -> TDigest comp
- insert :: forall (comp :: Nat). KnownNat comp => Double -> TDigest comp -> TDigest comp
- insert' :: forall (comp :: Nat). KnownNat comp => Double -> TDigest comp -> TDigest comp
- compress :: forall (comp :: Nat). KnownNat comp => TDigest comp -> TDigest comp
- forceCompress :: forall (comp :: Nat). KnownNat comp => TDigest comp -> TDigest comp
- totalWeight :: forall (comp :: Nat). TDigest comp -> Weight
- minimumValue :: forall (comp :: Nat). TDigest comp -> Mean
- maximumValue :: forall (comp :: Nat). TDigest comp -> Mean
- median :: forall (comp :: Nat). TDigest comp -> Double
- quantile :: forall (comp :: Nat). Double -> TDigest comp -> Double
- mean :: forall (comp :: Nat). TDigest comp -> Double
- variance :: forall (comp :: Nat). TDigest comp -> Double
- stddev :: forall (comp :: Nat). TDigest comp -> Double
- cdf :: forall (comp :: Nat). Double -> TDigest comp -> Double
- icdf :: forall (comp :: Nat). Double -> TDigest comp -> Double
- size :: forall (comp :: Nat). TDigest comp -> Int
- valid :: forall (comp :: Nat). TDigest comp -> Bool
- validate :: forall (comp :: Nat). TDigest comp -> Either String (TDigest comp)
- debugPrint :: forall (comp :: Nat). TDigest comp -> IO ()
Construction
data TDigest (comp :: Nat) Source #
Instances
tdigest :: forall f (comp :: Nat). (Foldable1 f, KnownNat comp) => f Double -> TDigest comp Source #