| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Circuit.Stats.Quantiles
Description
Process quantile statistics.
Synopsis
- median :: Double -> Process Double Double
- quantiles :: Double -> [Double] -> Process Double [Double]
- digitize :: Double -> [Double] -> Process Double Int
- signalize :: Double -> [Double] -> Process Double Double
- data OnlineTDigest = OnlineTDigest {}
- emptyOnlineTDigest :: Double -> OnlineTDigest
- onlineInsert :: Double -> OnlineTDigest -> OnlineTDigest
- onlineCompress :: OnlineTDigest -> OnlineTDigest
- onlineForceCompress :: OnlineTDigest -> OnlineTDigest
Documentation
median :: Double -> Process Double Double Source #
Process median using the t-digest algorithm.
The t-digest algorithm works best at extremes and can be unreliable in the centre.
quantiles :: Double -> [Double] -> Process Double [Double] Source #
Process quantiles based on the t-digest library.
digitize :: Double -> [Double] -> Process Double Int Source #
A process that computes the running quantile bucket. For example,
in a scan, digitize 0.9 [0.5] returns:
- 0 if the current value is less than the current process median.
- 1 if the current value is greater than the current process median.
signalize :: Double -> [Double] -> Process Double Double Source #
transform an input to a [0,1] signal, via digitalization.
data OnlineTDigest Source #
An online t-digest with exponential decay weighting.
Each inserted point receives weight r ** (-(n+1)) where n counts
insertions since the last forced compression. Periodically the weights
are rescaled so that older points decay relative to newer ones.
Instances
| Show OnlineTDigest Source # | |
Defined in Circuit.Stats.Quantiles Methods showsPrec :: Int -> OnlineTDigest -> ShowS # show :: OnlineTDigest -> String # showList :: [OnlineTDigest] -> ShowS # | |
onlineInsert :: Double -> OnlineTDigest -> OnlineTDigest Source #
onlineCompress :: OnlineTDigest -> OnlineTDigest Source #
Force a compression pass when the digest has grown enough that the decay weights are becoming numerically awkward. The threshold is chosen to keep weights within a comfortable double range while preserving the exponential-decay semantics.
onlineForceCompress :: OnlineTDigest -> OnlineTDigest Source #
Rescale all centroid weights by r ** n and reset the insertion counter.
This is the exponential-decay equivalent of normalising weights.