Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
TDigest
postprocessing functions.
These are re-exported from Data.TDigest module.
Synopsis
- class Affine f => HasHistogram a f | a -> f where
- data HistBin = HistBin {}
- histogramFromCentroids :: NonEmpty Centroid -> NonEmpty HistBin
- quantile :: Double -> Weight -> NonEmpty HistBin -> Double
- mean :: NonEmpty HistBin -> Double
- variance :: NonEmpty HistBin -> Double
- cdf :: Double -> Double -> [HistBin] -> Double
- validateHistogram :: Foldable f => f HistBin -> Either String (f HistBin)
- class Traversable t => Affine t where
Histogram
class Affine f => HasHistogram a f | a -> f where Source #
Types from which we can extract histogram.
Histogram bin
Quantiles
Mean & variance
As we have "full" histogram, we can calculate other statistical variables.
CDF
Debug
validateHistogram :: Foldable f => f HistBin -> Either String (f HistBin) Source #
Validate that list of HistBin
is a valid "histogram".
Affine - internal
class Traversable t => Affine t where Source #
Affine containers, i.e. containing at most 1 element
This class doesn't have traverse
analogie
as it would require using Pointed
which is disputed type class.
traverseAff :: Pointed f => (a -> f b) -> t a -> f (t b)
Instances
Affine Maybe Source # | |
Defined in Data.TDigest.Postprocess.Internal | |
Affine Identity Source # | |
Defined in Data.TDigest.Postprocess.Internal | |
Affine (Proxy :: * -> *) Source # | |
Defined in Data.TDigest.Postprocess.Internal | |
(Affine f, Affine g) => Affine (Compose f g) Source # | |
Defined in Data.TDigest.Postprocess.Internal |