randomSample(by:seed:)
Creates a subset of the table by randomly selecting the given proportion of rows.
Declaration
func randomSample(by proportion: Double, seed: Int = 42) -> MLDataTableParameters
- proportion:
The fraction of rows to sample from the original table. The value must be in the range
(0.0, 1.0). - seed:
A number that seeds a random number generator.
Return Value
A new data table.