pub fn train_test_split<D>(
dataset: D,
ratios: &[f64],
seed: u64,
) -> Vec<SubsetDataset<D>>Expand description
Split a dataset into (train, val) or (train, val, test) subsets.
Returns SubsetDataset views over the original dataset.
ยงArguments
datasetโ the source datasetratiosโ slice of 2 or 3 floats that sum to 1.0, e.g.[0.8, 0.2]or[0.7, 0.15, 0.15]seedโ random seed for reproducible shuffling of indices