#data #iris #dataset #species #fisher #version #petal-length

irisdata

In-memory version of Fisher's Iris dataset

2 releases

0.1.2 Nov 28, 2022
0.1.1 Nov 26, 2022
0.1.0 Nov 26, 2022

#2 in #iris

23 downloads per month
Used in joinable

MIT/Apache

29KB
1K SLoC

irisdata

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);

No runtime deps