stratifiedSplit(proportions:seed:annotationColumn:)
Generates a new data table by splitting the data source using the specified proportions.
Declaration
func stratifiedSplit(proportions: [Double], seed: Int = timestampSeed(), annotationColumn: String) throws -> MLDataTableParameters
- proportions:
An array of doubles, each representing a portion of the data source. If these values don’t add up to
1.0, the method normalizes the numbers so that they do. - seed:
The value the method uses to initialize the random-number generator, which affects how the method splits the data.
- annotationColumn:
The name of the column the method uses to split the data.
Return Value
An MLDataTable containing the data source’s split contents.