stratifiedSplit(on:_:_:by:randomSeed:)
Generates two data frames by randomly splitting the rows of three columns, which you select by column identifiers, into strata.
Declaration
func stratifiedSplit<T0, T1, T2>(on columnID0: ColumnID<T0>, _ columnID1: ColumnID<T1>, _ columnID2: ColumnID<T2>, by proportion: Double, randomSeed: Int? = nil) -> (DataFrame, DataFrame) where T0 : Hashable, T1 : Hashable, T2 : HashableParameters
- columnID0:
A column identifier.
- columnID1:
A second column identifier.
- columnID2:
A third column identifier.
- proportion:
A proportion in the range
[0.0, 1.0]. - randomSeed:
A seed number for a random-number generator.
Return Value
A tuple of two data frames.