7 releases (4 breaking)

0.5.0 Apr 2, 2021
0.4.1 Jul 14, 2020
0.3.0 Jul 13, 2020
0.2.1 Apr 14, 2020
0.1.0 Apr 11, 2020

#15 in #identify

36 downloads per month

GPL-3.0-only

16KB
186 lines

outliers

A Rust crate used to identify outliers in a data set


lib.rs:

let data = [10.0, 12.0, 11.0, 15.0, 11.0, 14.0, 13.0, 17.0, 12.0, 22.0, 14.0, 11.0].to_vec();
let outlier_identifier = outliers::OutlierIdentifier::new(data, false);
let results_tuple = outlier_identifier.get_outliers().unwrap();

assert_eq!(results_tuple.0, [].to_vec()); // Lower outliers
assert_eq!(results_tuple.1, [10.0, 11.0, 11.0, 11.0, 12.0, 12.0, 13.0, 14.0, 14.0, 15.0, 17.0].to_vec()); // Non-outliers
assert_eq!(results_tuple.2, [22.0].to_vec()); // Upper outliers

Dependencies

~6MB
~112K SLoC