staf alternatives and similar packages
Based on the "Math" category.
Alternatively, view staf alternatives based on common mentions on social networks and blogs.
-
vector
An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop optimisation framework . -
statistics
A fast, high quality library for computing with statistics in Haskell. -
HerbiePlugin
GHC plugin that improves Haskell code's numerical stability -
hgeometry
HGeometry is a library for computing with geometric objects in Haskell. It defines basic geometric types and primitives, and it implements some geometric data structures and algorithms. The main two focusses are: (1) Strong type safety, and (2) implementations of geometric algorithms and data structures that have good asymptotic running time guarantees. -
dimensional
Dimensional library variant built on Data Kinds, Closed Type Families, TypeNats (GHC 7.8+). -
computational-algebra
General-Purpose Computer Algebra System as an EDSL in Haskell -
mwc-random
A very fast Haskell library for generating high quality pseudo-random numbers. -
numhask
A haskell numeric prelude, providing a clean structure for numbers and operations that combine them. -
poly
Fast polynomial arithmetic in Haskell (dense and sparse, univariate and multivariate, usual and Laurent) -
cf
"Exact" real arithmetic for Haskell using continued fractions (Not formally proven correct) -
optimization
Some numerical optimization methods implemented in Haskell -
equational-reasoning
Agda-style equational reasoning in Haskell -
safe-decimal
Safe and very efficient arithmetic operations on fixed decimal point numbers -
monoid-subclasses
Subclasses of Monoid with a solid theoretical foundation and practical purposes -
eigen
Haskel binding for Eigen library. Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. -
modular-arithmetic
A useful type for working with integers modulo some constant.
Tired of breaking your main and manually rebasing outdated pull requests?
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of staf or a related project?
README
Stats.Foldable
A pure Haskell module that implements a safe interface to a set of statistical
computations for all Foldable
containers. Folding (i.e. reducing or
crushing) is a great fit for statistics, where a full data set has to be
reduced to a single object that represents the set in a meaningful way.
Install
There are two standard ways of obtainig the module:
- by cloning the GitHub repository:
git clone https://github.com/lovasko/staf
- by using the central Hackage server:
cabal install staf
API
All staf
functions use the Maybe
type to represent a failure (e.g. an empty
container provided as the input). All numerical arguments are limited to the
least-assuming typeclass. The module exports the following 7 functions:
Arithmetic mean
amean :: (F.Foldable f, Floating a)
=> f a -- ^ population
-> Maybe a -- ^ arithmetic mean
Minimum
min :: (F.Foldable f, Ord a)
=> f a -- ^ population
-> Maybe a -- ^ minimal value
Maximum
max :: (F.Foldable f, Ord a)
=> f a -- ^ population
-> Maybe a -- ^ maximal value
Variance
var :: (F.Foldable f, Floating a)
=> f a -- ^ population
-> Maybe a -- ^ variance
Standard deviation
stddev :: (F.Foldable f, Floating a)
=> f a -- ^ population
-> Maybe a -- ^ standard deviation
Covariance
covar :: (F.Foldable f, Floating a)
=> f a -- ^ first population
-> f a -- ^ second population
-> Maybe a -- ^ covariance
Pearson correlation
correl :: (F.Foldable f, Floating a)
=> f a -- ^ first population
-> f a -- ^ second population
-> Maybe a -- ^ correlation
Numerical stability
There is no current stability guarantee in any of the provided algorithms.
License
The staf
module is licensed under the [2-clause BSD license](LICENSE). In
case that any other licensing is needed, feel free to contact the author.
Author
Daniel Lovasko [email protected]
*Note that all licence references and agreements mentioned in the staf README section above
are relevant to that project's source code only.