<!--
{
  "availability" : [
    "macOS: 10.15.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetector/DataSource/stratifiedSplit(proportions:seed:annotationColumn:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLObjectDetectorV10DataSourceO15stratifiedSplit11proportions4seed16annotationColumnAA11MLDataTableVSaySdG_SiSStKF"
  },
  "title" : "stratifiedSplit(proportions:seed:annotationColumn:)"
}
-->

# stratifiedSplit(proportions:seed:annotationColumn:)

Generates a new data table by splitting the data source using the specified proportions.

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

## Parameters

`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`](/documentation/CreateML/MLDataTable) containing the data source’s split contents.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)