---
title: "stratifiedSplit(proportions:seed:labelColumn:textColumn:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mltextclassifier/datasource/stratifiedsplit(proportions:seed:labelcolumn:textcolumn:)"
---

# stratifiedSplit(proportions:seed:labelColumn:textColumn:)

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

## Declaration

```swift
func stratifiedSplit(proportions: [Double], seed: Int = timestampSeed(), labelColumn: String, textColumn: 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. The default value is the current epoch time in milliseconds.
- `labelColumn`: The name of the column with the labels.
- `textColumn`: The name of the column with the text data.

## Return Value

Return Value A new data table.

## See Also

### Retrieving the data

- [labeledTexts()](createml/mltextclassifier/datasource/labeledtexts().md)
