---
title: "stratifiedSplit(proportions:seed:featureColumns:labelColumn:recordingFileColumn:)"
framework: Create ML
role: symbol
role_heading: Instance Method
platforms: [macOS 10.15+]
path: "createml/mlactivityclassifier/datasource/stratifiedsplit(proportions:seed:featurecolumns:labelcolumn:recordingfilecolumn:)"
---

# stratifiedSplit(proportions:seed:featureColumns:labelColumn:recordingFileColumn:)

Generates a data table by splitting the data source into strata.

## Declaration

```swift
func stratifiedSplit(proportions: [Double], seed: Int = timestampSeed(), featureColumns: [String], labelColumn: String, recordingFileColumn: String) throws -> MLDataTable
```

## Parameters

- `proportions`: An array of proportions, each in the range [0.0, 1.0].
- `seed`: A seed number for the random-number generator.
- `featureColumns`: The names of the feature columns the method includes in the data table.
- `labelColumn`: The name of the label column the methods stratifies.
- `recordingFileColumn`: The name of the column with the data file names.

## Return Value

Return Value A new MLDataTable instance.

## See Also

### Generating data tables from a data source

- [labeledSensorData(featureColumns:labelColumn:recordingFileColumn:)](createml/mlactivityclassifier/datasource/labeledsensordata(featurecolumns:labelcolumn:recordingfilecolumn:).md)
