<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/ShuffleRandomly",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents15ShuffleRandomlyV"
  },
  "title" : "ShuffleRandomly"
}
-->

# ShuffleRandomly

Apply transformations in a random order.

```
struct ShuffleRandomly<Element>
```

## Topics

### Creating a transformer

[`init<RandomTransformer>(() -> RandomTransformer)`](/documentation/CreateMLComponents/ShuffleRandomly/init(_:))

Creates a random shuffle augmentation.

### Performing the transformation

[`func applied(to: Element, generator: inout some RandomNumberGenerator, eventHandler: EventHandler?) async throws -> Element`](/documentation/CreateMLComponents/ShuffleRandomly/applied(to:generator:eventHandler:))

Apply transformations in a random order.

## Relationships

### Conforms To

[`RandomTransformer`](/documentation/CreateMLComponents/RandomTransformer)

---

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)