---
title: "stratifiedSplit(proportions:seed:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mlimageclassifier/datasource/stratifiedsplit(proportions:seed:)"
---

# stratifiedSplit(proportions:seed:)

Generates an array of labeled image dictionaries by splitting the data source into strata.

## Declaration

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

## Parameters

- `proportions`: An array of proportions, each in the range [0.0, 1.0].
- `seed`: A seed number for the random-number generator.

## Return Value

Return Value An array of dictionaries of labeled images.

## See Also

### Splitting the data

- [stratifiedSplit(proportions:generator:)](createml/mlimageclassifier/datasource/stratifiedsplit(proportions:generator:).md)
