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

# stratifiedSplit(proportions:generator:)

Generates an array of labeled image dictionaries by splitting the data source into strata using the random-number generator.

## Declaration

```swift
func stratifiedSplit<RNG>(proportions: [Double], generator: inout RNG) throws -> [[String : [URL]]] where RNG : RandomNumberGenerator
```

## Parameters

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

## Return Value

Return Value An array of dictionaries of labeled images.

## See Also

### Splitting the data

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