statistics-fusion-0.2: High performance, minimal statistics package using stream fusion

Portabilityportable
Stabilityexperimental
Maintainerdons@galois.com

Math.Statistics.Fusion

Description

Description :

A collection of commonly used statistical functions designed to fuse under stream fusion, with attention paid to the generated assembly.

These are high performance replacements for various list functions, implemented in pure Haskell using stream fusion for sequences.

To illustrate the performance gap, consider the task of calculating the numerically stable mean of a sequence of 1e9 double values.

Using the standard list implementation provided by the hstats package,

    $ time ./mean 
    3.141592653589793
    ./mean  26.80s user 0.08s system 99% cpu 26.965 total

And this package,

    $ time ./mean                      
    3.141592653589793
    ./mean  6.25s user 0.00s system 99% cpu   6.261 total

Synopsis

Documentation

mean :: UArr Double -> DoubleSource

A numerically stable mean.

required.

harmonic :: UArr Double -> DoubleSource

The harmonic mean

geometric :: UArr Double -> DoubleSource

The geometric mean of a non-negative list.

var :: UArr Double -> DoubleSource

A numerically stable variance.

stddev :: UArr Double -> DoubleSource

The standard deviation.