https://github.com/josephtlyons/outliers
A Rust crate used to identify outliers in a data set
https://github.com/josephtlyons/outliers
Last synced: about 2 months ago
JSON representation
A Rust crate used to identify outliers in a data set
- Host: GitHub
- URL: https://github.com/josephtlyons/outliers
- Owner: JosephTLyons
- License: gpl-3.0
- Created: 2020-04-11T05:54:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T00:36:07.000Z (over 3 years ago)
- Last Synced: 2025-04-22T16:18:38.729Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# outliers
[A Rust crate used to identify outliers in a data set](https://crates.io/crates/outliers)
```rust
use outliers::OutlierIdentifier;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
``````rust
use outliers::OutlierIdentifier;let data = [0.53, 0.57, 0.51, 0.60, 0.09, 12.75].to_vec();
let has_outliers = OutlierIdentifier::new(data, false).has_outliers().unwrap();assert!(has_outliers);
```