std1.0.0-beta-7 SafeC docs

Module ml::datasets

#include <std/ml/datasets.h> source

datasets and mini-batch loading for std::ml.

A Dataset is two row-aligned tensors: x [n, features] and y [n, targets]. For classification y is [n, 1] holding class indices as floats and 'classes' is the class count; for regression y holds the targets and 'classes' is 0; an unlabeled set (autoencoders, GANs) has y [n, 1] of zeros.

Synthetic generators (all seeded through an Rng, so reproducible): the usual 2D toy problems for classifiers (moons, circles, spirals, blobs, XOR), a sine regression, a ring of Gaussians (the standard GAN mode- collapse test) and "shapes", small binary images of four shape classes for autoencoders and GANs. Loaders read MNIST / Fashion-MNIST IDX files and numeric CSV.

Structs

Dataset
DatasetSplit
Batch
DataLoaderIterates a dataset in batches of 'batchSize' (the last one may be smaller), in a fresh random order every epoch when 'shuffle'.