mealy-0.1.0: Mealy machines for processing time-series and ordered data.
Safe HaskellNone
LanguageHaskell2010

Data.Mealy.Quantiles

Description

Mealy quantile statistics.

Synopsis

Documentation

median :: Double -> Mealy Double Double Source #

Mealy median using tdigest

The tdigest algorithm works best at extremes and can be unreliable in the centre.

quantiles :: Double -> [Double] -> Mealy Double [Double] Source #

Mealy quantiles based on the tdigest library

digitize :: Double -> [Double] -> Mealy Double Int Source #

A mealy that computes the running quantile bucket. For example, in a scan, digitize 0.9 [0,0.5,1] returns:

  • 0 if the current value is less than the current mealy median.
  • 1 if the current value is greater than the current mealy median.