Skip to main content

iris

Function iris 

Source
pub fn iris() -> Result<IrisDataset>
Expand description

Load the Iris dataset

Returns a dataset with 150 samples and 5 columns:

  • sepal_length (f64)
  • sepal_width (f64)
  • petal_length (f64)
  • petal_width (f64)
  • species (string: “setosa”, “versicolor”, “virginica”)

§Errors

Returns an error if the dataset cannot be constructed (should never happen for embedded data).

§Example

use alimentar::datasets::{iris, CanonicalDataset};

let dataset = iris().unwrap();
println!(
    "Iris dataset: {} samples, {} features",
    dataset.len(),
    dataset.num_features()
);