Crates.io | irisdata |
lib.rs | irisdata |
version | 0.1.2 |
source | src |
created_at | 2022-11-26 06:58:15.426116 |
updated_at | 2022-11-28 14:53:05.786633 |
description | In-memory version of Fisher's Iris dataset. |
homepage | https://github.com/aeshirey/irisdata/ |
repository | https://github.com/aeshirey/irisdata/ |
max_upload_size | |
id | 723124 |
size | 40,036 |
Fisher's Iris data set. Add this to your project with cargo add irisdata
, then you can use these data however you want:
let virginica_avg_petal_length = irisdata::IRIS_DATA
.iter()
.filter_map(|i| {
if i.species == Species::IrisVirginica {
Some(i.petal_length)
} else {
None
}
})
.sum::<f32>()
/ 50.;
assert_eq!(5.5520005, avg);