stratifiedSplit(proportions:seed:)
Generates an array of labeled audio dictionaries by splitting the data source into strata.
Declaration
func stratifiedSplit(proportions: [Double], seed: Int = timestampSeed()) throws -> [[String : [URL]]]Parameters
- proportions:
An array of proportions, each in the range
[0.0, 1.0]. - seed:
A seed for the random-number generator.
Return Value
An array of dictionaries of labeled audio files. Each dictionary key is a label string and its value is an array of audio-file URLs.