32 releases

0.15.1 Apr 26, 2024
0.15.0 Mar 22, 2024
0.14.2 Mar 22, 2024
0.14.1 Jul 4, 2023
0.6.2 Jun 21, 2017

#3 in Science

Download history 9235/week @ 2024-07-27 10163/week @ 2024-08-03 8091/week @ 2024-08-10 8466/week @ 2024-08-17 8614/week @ 2024-08-24 10711/week @ 2024-08-31 10624/week @ 2024-09-07 9420/week @ 2024-09-14 8092/week @ 2024-09-21 9176/week @ 2024-09-28 10463/week @ 2024-10-05 10102/week @ 2024-10-12 10398/week @ 2024-10-19 9322/week @ 2024-10-26 10289/week @ 2024-11-02 7167/week @ 2024-11-09

39,040 downloads per month
Used in 24 crates (19 directly)

MIT/Apache

105KB
2K SLoC

average

Calculate statistics of a sequence iteratively in a single pass, using constant space and avoiding numerical problems. The calculations can be easily parallelized by using merge.

This crate works without std.

Documentation Status Latest Version Build Status

Implemented statistics

  • Mean and its error.
  • Variance, skewness, kurtosis.
  • Arbitrary moments.
  • Minimum and maximum.
  • Quantile.
  • Histogram.

Crate features

The following features are available:

  • libm enables Quantile (using floating point functions provided by libm). This is enabled by default. If the std feature is also enabled, std is preferred over libm.
  • std enables Quantile (using floating point functions provided by std).
  • serde1 enables serialization, via Serde version 1.
  • rayon enables support for rayon::iter::FromParallelIterator.
  • nightly enables the use of const generics for a histogram implementation without macros. Note that nightly features are not stable and therefore not all library and compiler versions will be compatible.

Rust version requirements

Rustc version 1.61 or greater is supported.

  • quantiles: Provides quantile estimates with bounded error but using growing space.

Dependencies

~105–760KB
~15K SLoC