---
title: "applied(_:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/onehotencoder/transformer/applied(_:eventhandler:)"
---

# applied(_:eventHandler:)

Performs a one-hot encoding on a sequence of inputs.

## Declaration

```swift
func applied<S>(_ input: S, eventHandler: EventHandler? = nil) throws -> [[Int]] where S : Sequence, S.Element == Category?
```

## Parameters

- `input`: A sequence of input values.
- `eventHandler`: An event handler.

## Return Value

Return Value An array of one-hot encoded arrays.

## See Also

### Performing the transformation

- [applied(to:eventHandler:)](createmlcomponents/onehotencoder/transformer/applied(to:eventhandler:).md)
