oa::data::random_split
Randomly split indices into train, validation, and test subsets. Matches donor FnDataset::randomSplit: clamp train to [0, 1] and validation to [0, 1 - train], truncate their FP32 counts, and assign the remainder to test. The donor header’s claim that the remainder goes to train contradicts its implementation; this port follows the implementation. Errors Returns an error for a negative size, non-finite ratios, allocation failure, or failure to derive a clock seed when seed is zero.
Function Documentation
Randomly split indices into train, validation, and test subsets. Matches donor FnDataset::randomSplit: clamp train to [0, 1] and validation to [0, 1 - train], truncate their FP32 counts, and assign the remainder to test. The donor header’s claim that the remainder goes to train contradicts its implementation; this port follows the implementation. Errors Returns an error for a negative size, non-finite ratios, allocation failure, or failure to derive a clock seed when seed is zero.