iterstats
Statistics for rust iterators.
Extra iterator methods for common statistics operations.
To most easily get the functionality of this crate, import the [Iterstats] trait. See the methods belonging to the trait for all available functionality.
Example
// import the `Iterstats` trait into scope
use Iterstats;
// start with your dataset
let data = ;
// say you want the mean
let mean = data.iter.mean;
assert_eq!;
// get the variance
let variance = data.iter.variance;
assert_eq!;
// or standard deviation
let stddev = data.iter.stddev;
assert_eq!;
// or the zscore of each data point
let zscores = data.iter.zscore.;
assert_eq!;
Additional
Shoutout to
itertools, which was one of the inspirations for this project.