31 releases

0.15.0 Mar 22, 2024
0.14.1 Jul 4, 2023
0.13.1 May 14, 2021
0.12.0 Mar 31, 2021
0.6.2 Jun 21, 2017

#9 in Science

Download history 4776/week @ 2024-01-03 6411/week @ 2024-01-10 6078/week @ 2024-01-17 6507/week @ 2024-01-24 5916/week @ 2024-01-31 6800/week @ 2024-02-07 7855/week @ 2024-02-14 6202/week @ 2024-02-21 6347/week @ 2024-02-28 5375/week @ 2024-03-06 6456/week @ 2024-03-13 6392/week @ 2024-03-20 4541/week @ 2024-03-27 6255/week @ 2024-04-03 5418/week @ 2024-04-10 4767/week @ 2024-04-17

21,875 downloads per month
Used in 21 crates (16 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–780KB
~16K SLoC