oa::FnDataset
FnDataset namespace in the OA Data public surface.
NsC++ public headers
Public Types
Public Functions
Function Documentation
Collate a span of samples into a single batch. Returns an empty batch when samples are empty, inconsistent, or cannot be represented with a leading batch dimension.
Parameters
inSamplesoa::Span<const Dataset::Sample>—
Returns
BatchThe declared return value.
Randomly split indices into train/val/test subsets. Ratios are clamped so that train+val+test < = totalSize. Any remainder goes to the training set.
Parameters
inTotalSizeoa::I64—
inTrainRatiooa::F32Default: 0.8f
inValRatiooa::F32Default: 0.1f
inSeedoa::U64Default: 42
Returns
SplitResultThe declared return value.
Fisher-Yates shuffle on an index array.
Parameters
inOutIndicesoa::Vector<oa::I64> &—
inSeedoa::U64Default: 0
Returns
voidThe declared return value.