online-0.4.0.0: online statistics

Online.Medians

Synopsis

# convert a statistic to an online median stat equivalent to L1

data Medianer a b Source #

A rough Median. The average absolute value of the stat is used to callibrate estimate drift towards the median

Constructors

 Medianer FieldsmedAbsSum :: a medCount :: b medianEst :: a

onlineL1 :: (Ord b, Fractional b) => b -> b -> (a -> b) -> (b -> b) -> Fold a b Source #

onlineL1 takes a function and turns it into a Fold where the step is an incremental update of an (isomorphic) median statistic.

onlineL1' :: (Ord b, Fractional b) => b -> b -> (a -> b) -> (b -> b) -> Fold a (b, b) Source #

onlineL1' takes a function and turns it into a Fold where the step is an incremental update of an (isomorphic) median statistic.

# online statistics

maL1 :: (Ord a, Fractional a) => a -> a -> a -> Fold a a Source #

moving median >>> L.fold (maL1 inc d r) [1..n] 93.92822312742108

absmaL1 :: (Ord a, Fractional a) => a -> a -> a -> Fold a a Source #

moving absolute deviation

covL1 :: (Ord a, Fractional a) => a -> a -> a -> Fold (a, a) a Source #

covariance of a tuple

corrL1 :: (Ord a, Floating a) => a -> a -> a -> Fold (a, a) a Source #

correlation of a tuple

betaL1 :: (Ord a, Floating a) => a -> a -> a -> Fold (a, a) a Source #

the beta in a simple linear regression of a tuple

alphaL1 :: (Ord a, Floating a) => a -> a -> a -> Fold (a, a) a Source #

the alpha in a simple linear regression of snd on fst

autocorrL1 :: (Floating a, RealFloat a) => a -> a -> a -> a -> Fold a a Source #