Rstats - Rust Stats

GitHub last commit Crates.io

Rstats is a lean minimalistic library that only depends on anyhow (for its error handling). Trait RStats is carefully checked and will report all kinds of errors, such as empty input. Trait Vectors is unchecked to achieve speed, so some caution is advisable.

Trait RStats

has statistical methods implemented for i64 and f64 vectors (and their slices). For example, v.amean() computes the arithmetic mean of vector v of either Vec<i64> or Vec<f64> type (or their slices).

Included are:

Trait Vectors

has basic vector algebra implemented for &[f64] slices. You may get errors when invoking them on Vectors but that is easily remedied by using, e.g.: myvector.as_slice().

Releases

Future Work

More methods will be added in future versions; in particular the geometric median of n-dimensional data, using an improved Weiszfeld's algorithm with guaranteed convergence.