Skip to main content

Module datasets

Module datasets 

Source
Expand description

Canonical ML dataset loaders

Provides convenient one-liner access to well-known ML datasets for tutorials, examples, and benchmarking.

§Example

use alimentar::datasets::{iris, mnist, cifar10};

// Load Iris dataset (embedded, no download)
let iris = iris()?;
println!("Iris: {} samples", iris.len());

// Load MNIST (downloads from HuggingFace Hub on first use)
let mnist = mnist()?;
let (train, test) = mnist.split()?;

Structs§

Cifar10Dataset
CIFAR-10 image classification dataset
Cifar100Dataset
CIFAR-100 image classification dataset
DatasetSplit
Split information for train/test datasets
FashionMnistDataset
Fashion-MNIST clothing classification dataset
IrisDataset
The Iris flower dataset
MnistDataset
MNIST handwritten digits dataset

Constants§

CIFAR10_CLASSES
CIFAR-10 class names
CIFAR100_COARSE_CLASSES
CIFAR-100 coarse class names (20 superclasses)
CIFAR100_FINE_CLASSES
CIFAR-100 fine class names (100 classes)
FASHION_MNIST_CLASSES
Fashion-MNIST class names

Traits§

CanonicalDataset
A canonical ML dataset with train/test split support

Functions§

cifar10
Load CIFAR-10 dataset (embedded 100-sample subset)
cifar100
Load CIFAR-100 dataset (embedded 100-sample subset)
fashion_mnist
Load Fashion-MNIST dataset (embedded 100-sample subset)
iris
Load the Iris dataset
mnist
Load MNIST dataset (embedded 1000-sample subset)